Repository navigation
feat(markdown): node content is the markdown source of its body - #158
Merged
Merged
Conversation
content is now sliced verbatim from the original markdown instead of being rebuilt from mdast plain text, for page nodes and embedded heading, list item and table-fallback content. Inline formatting, links, code fences and lists survive. Embedded nodes exclude nested embedded nodes. Untyped headings are kept in the content of the enclosing node and now end a deeper embedded node's section, so a '# Computation' section is visible in the page content. measured: existing tests asserted only plain single-paragraph bodies, so none changed; the new tests in parse-embedded-content.test.ts cover the markdown, heading and nesting cases. Space-on-a-page preamble is still discarded (no node owns it).
The rule accepted any body text because node content was plain text without headings. Content is now markdown source, so the rule checks for a '# Computation' heading line (or a computation path). measured: body-without-computation.md (prose body, no such heading) is flagged; the bundle's computations/revenue.md still passes.
Content is now taken from the original text as source ranges per node instead of being rebuilt from per-block slices, so blank lines, list looseness and line endings survive. Inline field lines are stripped like YAML blocks; fields mid-sentence stay in prose. Untyped headings end the section of embedded nodes at the same or a higher level and stay inside deeper ones. Missing source positions now throw.
Pin the known false pass on a '# Computation' line inside a code fence with a fixture, and state it in the rule description.
…dent Continuation content of a list item node now reads as markdown on its own. Lines indented further keep their extra indent; line endings are preserved. Heading and page content is unchanged.
mindsocket
commented
Oct 16, 2026
Code reviewNo issues found. Checked for bugs and CLAUDE.md compliance. 🤖 Generated with Claude Code |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #147. Bottom of a stack: #158 → #159 → #160 → #161.
Summary
contentis now the markdown source of its body, sliced from the original text. It is no longer rebuilt from parsed blocks, so loose lists stay loose, separate lists stay separate, and line endings are kept.key:: value,[key:: value]) are left out of content, like YAML field blocks. A field written mid-sentence stays in the prose.okf-computation-presentnow requires a# Computationsection. Known limitation, documented in the rule: it also matches that line inside a fenced code block.Notes for review
contentchanges for every space. Smoke tests against local spaces pass.src/plugins/miro/styles.ts) now show raw markdown. Cheapest check: render a card from a node whose content contains**bold**.