From f2ba087f748cb02a4d7a33c8b09affcbcc23bde8 Mon Sep 17 00:00:00 2001 From: Mack <103027852+mackt@users.noreply.github.com> Date: Thu, 23 Apr 2026 07:08:19 +0800 Subject: [PATCH] fix(editor): preserve nested ordered lists through readonly render (#1512) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- packages/views/editor/extensions/index.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/views/editor/extensions/index.ts b/packages/views/editor/extensions/index.ts index e8c1f025d..cc82594e3 100644 --- a/packages/views/editor/extensions/index.ts +++ b/packages/views/editor/extensions/index.ts @@ -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" },