使用 KefirBB 解析自定义 BBCode

Parsing custom BBCode with KefirBB

我目前正在努力研究如何配置 KefirBB 来解析自定义 BBCode。我尝试解析的自定义代码如下所示:

[quote=username] quoted text [/quote]

甚至可以将 Kefir 配置为使用用户名属性吗? 结果应该是一个简单的 HTML 块引用,第一行是用户名,下一行是引用的文本。 如果有人能告诉我如何以编程方式执行此操作,那就太好了。

提前致谢

 <code name="quote1">
    <pattern ignoreCase="true">[quote=<var name="name" scope="escapeXml"/>]<var name="text" inherit="true"/>[/quote]</pattern>
    <template>&lt;blockquote class=&quot;uncited&quot; &gt;&lt;div&gt;&lt;cite&gt;<var name="name"/> wrote:&lt;/cite&gt;<var name="text"/>&lt;/div&gt;&lt;/blockquote&gt;</template>
</code>