Problem
Deck's inline/block parsing is a pipeline of regexes over flat strings:
ConvertTo-SpectreMarkup applies bullet/bold/italic/color passes by regex with no structural context
ConvertFrom-DeckMarkdown splits slides by --- matching with code-fence placeholders
ConvertTo-CodeBlockSegments splits code blocks by non-greedy fence regex
New-TableRenderable splits tables by | string ops
The converter receives bare strings with no context. It cannot distinguish a list item - 5% from a table cell containing - 5%, a fence-closing `````` from one inside a code sample, or a heading from heading-like text in code.
Concrete bugs caused by this architecture
Proposed direction
Adopt a real markdown parser producing an AST, then render by walking typed nodes:
Candidate engines: Markdig (.NET, CommonMark + GFM, loadable from PowerShell), or a PowerShell-native wrapper. Evaluate Markdig first — mature, MIT, single DLL, and Spectre.Console already proves the .NET-dependency pattern works for this module.
Non-goals for this issue
Relation to other issues
Supersedes the root cause of #4, #5, #9, #25. Those remain fixable independently in the interim.
Problem
Deck's inline/block parsing is a pipeline of regexes over flat strings:
ConvertTo-SpectreMarkupapplies bullet/bold/italic/color passes by regex with no structural contextConvertFrom-DeckMarkdownsplits slides by---matching with code-fence placeholdersConvertTo-CodeBlockSegmentssplits code blocks by non-greedy fence regexNew-TableRenderablesplits tables by|string opsThe converter receives bare strings with no context. It cannot distinguish a list item
- 5%from a table cell containing- 5%, a fence-closing `````` from one inside a code sample, or a heading from heading-like text in code.Concrete bugs caused by this architecture
-/*Show-Deck.ps1re-implements heading/content detection per branch (Allow H1/H2 content to mix with other content types #4, Enable Progressive Bullets in All Slides Types #5 root cause)\*,\-) — CommonMark authors expect itProposed direction
Adopt a real markdown parser producing an AST, then render by walking typed nodes:
Candidate engines: Markdig (.NET, CommonMark + GFM, loadable from PowerShell), or a PowerShell-native wrapper. Evaluate Markdig first — mature, MIT, single DLL, and Spectre.Console already proves the .NET-dependency pattern works for this module.
Non-goals for this issue
Relation to other issues
Supersedes the root cause of #4, #5, #9, #25. Those remain fixable independently in the interim.