We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Learn more about funding links in repositories.
Report abuse
BlockDOM2Md
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
在 v2.1.14 版本中使用 API /api/history/getDocHistoryContent + Lute 的 BlockDOM2Md 接口与 API /api/block/getBlockKramdown 实现了文档历史的差异对比功能, 但是 v2.2.0 版本中移除了 Lute 的 BlockDOM2Md 接口, 导致该功能夭折了
v2.1.14
/api/history/getDocHistoryContent
/api/block/getBlockKramdown
v2.2.0
希望提供一种可以获得指定历史文档 kramdown 源码的 API
内核/Lute 提供 *.sy(文件或文本) => kramdown 文本接口
*.sy
kramdown
内核/Lute 提供 BlockDOM 文本 => kramdown 文本接口
BlockDOM
希望该接口输出的 kramdown 的 IAL 与 API /api/block/getBlockKramdown 获得的 kramdown 源码 IAL 属性名顺序一致, 或者说按照同一个规范排序, 以保证相同 IAL 转换而来的 IAL 字符串是完全一致的
该功能同样用于文档历史的差异对比分析
The text was updated successfully, but these errors were encountered:
还发现了一个问题, 当 BlockDOM 中 contenteditable="false" 时, lute.BlockDOM2StdMd 也无法正常解析, 如下所示
contenteditable="false"
lute.BlockDOM2StdMd
<div data-node-id="20220922163433-mhzu1yl" data-type="NodeParagraph" class="p" custom-quote-time="2022-09-22 16:34:33" custom-quote-type="comment" updated="20220922163433" custom-quote-id="20220922163433-0iemj98"> <div contenteditable="false" spellcheck="false">测试</div> <div class="protyle-attr" contenteditable="false"></div> </div>
解析为: <div contenteditable="false" spellcheck="false">测试</div>
<div contenteditable="false" spellcheck="false">测试</div>
<div data-node-id="20220922163433-mhzu1yl" data-type="NodeParagraph" class="p" custom-quote-time="2022-09-22 16:34:33" custom-quote-type="comment" updated="20220922163433" custom-quote-id="20220922163433-0iemj98"> <div contenteditable="true" spellcheck="false">测试</div> <div class="protyle-attr" contenteditable="false"></div> </div>
解析为: 测试
测试
Sorry, something went wrong.
🎨 Lute 实例提供 BlockDOM2Md 函数 siyuan-note/siyuan#5922
a1a21c8
🎨 Lute 实例提供 BlockDOM2Md 函数 Fix #5922
d9ee243
contenteditable="false" 时不会解析节点
https://github.com/88250/lute/blob/a1a21c8c750148dc055576a7c5112bd67b55afd9/protyle.go#L728
88250
No branches or pull requests
在什么情况下你需要该特性?In what scenarios do you need this feature?
在
v2.1.14
版本中使用 API/api/history/getDocHistoryContent
+ Lute 的BlockDOM2Md
接口与 API/api/block/getBlockKramdown
实现了文档历史的差异对比功能, 但是v2.2.0
版本中移除了 Lute 的BlockDOM2Md
接口, 导致该功能夭折了希望提供一种可以获得指定历史文档 kramdown 源码的 API
描述可能的最优解决方案 Describe the optimal solution
内核/Lute 提供
*.sy
(文件或文本) =>kramdown
文本接口描述候选的解决方案 Describe the candidate solution
内核/Lute 提供
BlockDOM
文本 =>kramdown
文本接口其他信息 Other information
希望该接口输出的 kramdown 的 IAL 与 API
/api/block/getBlockKramdown
获得的 kramdown 源码 IAL 属性名顺序一致, 或者说按照同一个规范排序, 以保证相同 IAL 转换而来的 IAL 字符串是完全一致的该功能同样用于文档历史的差异对比分析
The text was updated successfully, but these errors were encountered: