Skip to content

fix(content): treat indented lines as code only where CommonMark does - #4

Merged
m1ngsama merged 1 commit into
mainfrom
fix/indented-code-context
Sep 26, 2026
Merged

m1ngsama merged 1 commit into
mainfrom
fix/indented-code-context

Conversation

@m1ngsama

@m1ngsama m1ngsama commented Sep 26, 2026 •

Copy link
Copy Markdown
Member

40663fe drops any line indented four spaces or a tab as indented code, so component attributes and summaries silently disappear.

  • <Figure with attributes indented four spaces now keeps src and caption (was {}).
  • <PageHero with tab-indented title and lede keeps both, so the page title and summary come back.
  • A component indented under a list item is found again.
  • A lazily continued paragraph stays in the summary.

An indented line now counts as code only after a blank line or other code, measured from the enclosing list item. The three fence-skipping loops share one proseLines helper. All 250 files in nbtca/documents parse the same as before 40663fe.

@m1ngsama
m1ngsama force-pushed the fix/indented-code-context branch from 81eaf0e to e429eb8 Compare September 26, 2026 06:05
@m1ngsama
m1ngsama merged commit 569fb85 into main Sep 26, 2026
5 checks passed
@m1ngsama
m1ngsama deleted the fix/indented-code-context branch September 26, 2026 06:08
@m1ngsama m1ngsama mentioned this pull request Sep 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant