You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Markdig's MarkdownPipelineBuilder.MaximumNestingDepth (128) is enforced during parsing: Markdown.Parse throws ArgumentException: Markdown elements in the input are too deeply nested for 128 or more nested block quotes. Probed on the #1000 branch: 127 nested > parse and render within the limit; 128, 129, 140 and 300 throw, in a plain MarkdownPipelineBuilder().Build() pipeline exactly as in the reader's.
MarkView's MarkdownViewer.RenderMarkdown calls Markdown.Parse from its Markdown property-changed handler, so the exception surfaces inside MarkdownView's render — for every flavor, chat included. A transcript line or comment body of 256 characters (> × 128) is enough. What the desktop app does with an exception escaping that handler is unverified; at best the view shows nothing for that item.
Independent of #982 / #1000, which budget only the nesting the HTML pass synthesizes; a tree deeper than the limit never reaches the pass because parsing throws first.
Candidate fixes, each its own design:
MarkdownView.Render() catches the parse failure and shows the text as plain text (a TextBlock with the source), the same degrade the reader uses for HTML it cannot convert.
Cap nesting before handing text to the viewer — cheaper, but it means a second parser.
Repro: new MarkdownView { Text = string.Concat(Enumerable.Repeat("> ", 128)) + "x" }.
Activity
linear-code commentedon Sep 18, 2026
AI-2940
Await the plain-text fallback's clipboard write (#1004)
Copy the plain-text fallback's selection with the copy shortcut (#1004)