feat(content): retained Markdown document model, parser, and renderers [L01.01.05.10.02] - #940
Merged
Merged
Conversation
…, and renderers [L01.01.05.10.02] Turns Content.Markdown from a placeholder into the Markdown format package: a closed node family (blocks, inlines, document, list items), a two-phase parser over Content.Text's TextTokenizer implementing a documented subset of CommonMark 0.31.2, an HTML renderer in the spec's output shapes, and a canonical Markdown writer with a round-trip guarantee (write-parse-write is a fixed point; reparse preserves rendered HTML). Excluded constructs (setext headings, indented code, raw HTML, reference links, GFM) degrade predictably to literal text and the parser never throws for input; both renderers walk iteratively so hostile nesting cannot overflow the stack. MarkdownText follows the YamlText facade convention (Format descriptor, Parse over string/stream/ITextContent, ToHtml, Write, content-seam reader/writer). Adds Content.Markdown to the Content CI matrix and updates the area project map. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.
Summary
Turns
Assimalign.Cohesion.Content.Markdownfrom a placeholder into the Markdown format package of the Content family — the first consumer of theContent.TextTextTokenizer(PR #931), and the prerequisite for the static content engine resource.docs/DESIGN.mdcarries the full subset and degradation table.TextTokenizerdefault options (open-container stack, tab-aware columns, container depth cap of 128); inline phase tokenizes leaf content through a custom delimiter table and assembles delimiter runs by offset contiguity.MarkdownNodefamily (private protectedroot, sealed concretes), mutable with validating setters for programmatic document construction;MarkdownTextfacade mirrorsYamlText(Format,Parse(string|Stream|ITextContent)with encoding detection,ToHtml,Write,CreateReader/CreateWriterseams).Testing
142 tests, all passing: block structure (28), inlines (27), spec-derived corpus cases transcribed from CommonMark 0.31.2 with section attribution (38 theory rows), round-trip fixed-point + canonicalization (35), model/facade/seams (10+), plus degradation pins for every excluded construct. The full spec corpus harness remains #469's scope.
Content.Text's 46 tests still pass; Release build is warning-free.Wiring
Assimalign.Cohesion.Content.Markdownadded to the Content workflow matrix.libraries/Content/README.md); packageREADME.md/docs/OVERVIEW.md/docs/DESIGN.mdcreated.Class1.cs/UnitTest1.csand the placeholder test csproj's forbidden<Using Include>removed.Work items resolved by this PR
Closes #468
🤖 Generated with Claude Code