New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
导出 Markdown 行级元素改进 #6472
Comments
@88250 刚刚又发现了新的相关问题 123**\-\-\-\-\> 1**{: style="color: red;"} 能够正常显示, 但是导出内容非常奇怪: 123**-****-****-****-****> 1** 数据库 markdown 字段内容也非常奇怪: 123**-**{: style="color:red;"}**-**{: style="color:red;"}**-**{: style="color:red;"}**-**{: style="color:red;"}**> 1**{: style="color:red;"} 期望导出内容为: 123**\-\-\-\-\> 1** 期望数据库中 markdown 字段内容为: 123**\-\-\-\-\> 1**{: style="color: red;"} |
呃,有个问题搞不定,就是转义符 #6473 中使用新模式主要是为了插入,但是解决不了完全符合 Markdown 规范的导出结果,所以暂时不考虑了。 |
这里能举个实例嘛, 我不太清楚是什么情景❓ |
该结果的导出与数据库内容也是正常的嘛, 如果是正常的, 可能刚刚顺手修复了 |
就是目前这个例子,TextMark 结构中不存在嵌套节点结构,并且也不存在转义符节点(Backslash),所以 Strong 中的每个 Backslash 节点会被展开平铺,这样的话就会导致形成首尾相接的 **,为了符合标准 Markdown 语法,我们在首尾相接的情况时插入了零宽空格来区隔两个 Strong,但是如果这样的连续情况出现多次,就会变成 这个问题要解决的话需要修改 Lute 将嵌套结构转换为平铺结构那里的算法,或者在导出 Markdown 时将 AST 结构 TextMark->IAL->TextMark->IAL 根据相同 TextMark 类型 IAL 值进行去重合并,变为一个 TextMark 节点,这样就直接渲染为 这个问题目前影响不大,改起来比较复杂,所以暂时先不动了,你如果有空的话可以帮忙试下。 |
嗯嗯, 那么先暂时搁置吧 |
输入
foo bar
后划选foo
并设置为加粗, 导出为 markdown 文档时对应的文本为**foo **bar
, 数据库中对应的字段也为**foo **bar
Originally posted by @Zuoqiu-Yingyi in #6470 (comment)
The text was updated successfully, but these errors were encountered: