fix(editor): preserve nested ordered lists through readonly render (#1512)

Default @tiptap/markdown serializer emitted nested list items with 2-space indent, but CommonMark (remark-gfm) requires ≥3 spaces under a `1.` marker — so ReadonlyContent (autopilot detail / issue / comment) flattened nested ordered lists, with third-level items glued onto their parent line. Configure Markdown extension with indentation.size = 3.

Closes #1510
This commit is contained in:
Mack
2026-04-23 07:08:19 +08:00
committed by GitHub
parent 059356cce7
commit f2ba087f74

View File

@@ -119,7 +119,8 @@ export function createEditorExtensions(
TableCell,
BlockMathExtension,
InlineMathExtension,
Markdown,
// 3-space indent so nested ordered lists survive CommonMark in ReadonlyContent.
Markdown.configure({ indentation: { style: "space", size: 3 } }),
FileCardExtension,
BaseMentionExtension.configure({
HTMLAttributes: { class: "mention" },