This commit is contained in:
2026-04-15 13:20:51 +08:00
parent 2a0c5380d4
commit 10ff96f32b
9 changed files with 1109 additions and 870 deletions

View File

@@ -9,7 +9,8 @@ marked.use(
nonStandard: true
})
);
marked.setOptions({ gfm: true, breaks: false });
// breaks: true — 段内单换行渲染为 <br>,与 Obsidian 等编辑器的换行习惯一致CommonMark 默认会把单换行当成空格)
marked.setOptions({ gfm: true, breaks: true });
function decodeHtmlEntities(str) {
return String(str)