Skip to content

MarkdownDisplayView 2.2.3 was released.

Latest

Choose a tag to compare

@zjc19891106 zjc19891106 released this 23 Sep 02:08
  • ↩️ Single Newlines Inside a Paragraph Now Wrap - A single newline inside a paragraph is a CommonMark soft break, and it used to render as a space. Chat and card copy that breaks lines with one \n therefore stayed on one reflowed line. MarkdownSoftBreakStyle chooses the rendering. The default .lineBreak inserts U+2028, which ends the line without ending the paragraph, so lineSpacing still applies and paragraphSpacing is not inserted between those lines. .paragraphBreak inserts \n, and TextKit adds paragraphSpacing, which looks like two paragraphs. .space keeps the CommonMark collapse into a space. Hard breaks (two trailing spaces or a trailing \) are unchanged, and fenced code blocks are unaffected.
  • ↩️ 段落内单换行默认即换行 - 段落里的单个换行是 CommonMark 的软换行,以前会渲染成空格,聊天和卡片文案里用单个 \n 断行的内容会粘在同一段里、只按容器宽度重折。新增 MarkdownSoftBreakStyle:默认 .lineBreak 插入 U+2028,只断行、不分段,行距仍是 lineSpacing,断行之间不会插入 paragraphSpacing;.paragraphBreak 插入 \n,TextKit 会补上 paragraphSpacing,视觉上等于两段;.space 保持 CommonMark,软换行并成空格。硬换行(行尾两个空格或 \)不变,代码围栏不受影响。