Repository navigation
Conversation
🦋 Changeset detectedLatest commit: 037d403 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
cherry-markdown
@cherry-markdown/miniprogram
commit: |
Contributor
|
Size Change: +17 kB (+0.25%) Total Size: 6.93 MB 📦 View Changed
ℹ️ View Unchanged
|
Collaborator
Collaborator
🔌 VSCode Plugin 构建产物
|
Collaborator
🌐 Playground 预览
|
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #1902
原因
<details>走通用 HTML 和段落处理流程,生成的段落边界可能与折叠标签交叉,浏览器修正 DOM 时提前闭合容器,导致正文脱离折叠范围。长文分批清洗也可能截断容器。+++原有正则切分缺少嵌套归属信息,无法可靠处理两种语法的混合嵌套。方案
两种语法统一解析为折叠节点树,共用分区、正文和递归渲染逻辑。语法差异集中在解析阶段,异常输入共用恢复规则;HTML 清洗按完整容器边界分批并复用缓存。
兼容性差异
保留 HTML 属性、summary、默认展开状态,以及
+++多分区和行数统计规则。闭合的 HTML 折叠块改用统一 DOM 结构;外层
+++未闭合时保留其原文并渲染已闭合子块,不再沿用旧实现的误切分行为。