llama.cpp 服务器UI:代码片段正在被< em>斜体强调替换,

a9wyjsp7  于 2个月前  发布在  其他
关注(0)|答案(3)|浏览(49)

llama.cpp/examples/server/public/index.html
Line 888 in 1613ef8
| | .replace(/(.*?)(?=([^]*[^]*)*[^]*$)/g,'<em>$1</em>') | I've been having a headache reformatting code samples in the UI as it keeps replacing underscores with italictags. Can we either add this as an option or adjust the regex to avoid ```code blocks? In this case "create*command*queue" should becreate_command_queue` and must be fixed before being used in code:


**

91zkwejq

91zkwejq1#

是的,这个bug已经存在很长时间了。如果显示错误,几乎无法正常使用llama.cpp,尤其是在编码时。
似乎服务器在markdown格式化方面存在一个bug,或者没有正确工作的markdown解析器。
有人提到解决方案将是一个“真正的流式markdown解析器”:

5788 (评论)

我认为这都是同一个问题:
#5335
#5788

7023

#3723
希望这个bug能被修复。

a1o7rhls

a1o7rhls2#

这可以被吸收到 #3723 中。最初的报告是关于星号的,但后来扩展到了所有的markdown字符。

jrcvhitl

jrcvhitl3#

只需注意这一点——我的解决方法是通过主题的自定义--public目录来解决这个问题。因为实际上是在客户端发生的,所以在主题中删除markdown格式非常简单。

相关问题