Console.Format targets terminal styling, not a document renderer.
Flow and algorithm
Platform spec article
Flow and algorithm
Spec standingStandard
-
Only the tested markup subset is normative.
Context
Decision
Rule Detail Scope Tested sigils and markdown subset only Non-goal Full CommonMark compliance Consequences
New syntax requires tests before Standard promotion.
Verification anchors
FormatMarkdownTests.bd;Format/Scan.bd. -
Bracket color tags map to fixed palette names.
Context
Arbitrary RGB in markup v1 would bypass capability downgrade rules.
Decision
Rule Detail Tags [red]-style names map to fixed paletteRGB Not supported inside markup v1 Consequences
Authors use Ansi builders for advanced color outside markup.
Verification anchors
FormatAttributesTests.bd.
- Contracts and edge cases Markup parsing rules and rendering requirements.
- Design model Markup syntax layers and render pipeline overview.
- Examples Console markup usage for CLI output.
- Flow and algorithm Recursive descent rendering for console markup.
- Verification and traceability Markup golden tests and module anchors.
0 revisions (git unavailable at build; counts may be empty)
No commits recorded for this path.
| Section id | Required | Found |
|---|---|---|
what-this-feature-specifies | yes | yes |
implementation-anchors | yes | yes |
Full tree: run pnpm verify:platform-spec-layout (writes src/generated/platform-spec-layout-report.json).
Purpose
Section titled “Purpose”Document flow and algorithm for the Console Markup Format feature: role-specific normative detail beyond the feature hub.
Canonical references
Section titled “Canonical references”- Feature hub: Console Markup Format
- Sibling articles in this bundle (design model, contracts, flow, examples, verification)
Detailed behavior
Section titled “Detailed behavior”RenderInner(source, ansi) algorithm
Section titled “RenderInner(source, ansi) algorithm”- If length zero → return
"". - If starts with
\and next char is escapable sigil → emit sigil + recurse on remainder. - If starts with
**and closing**exists → render inner with bold chain whenansi, recurse tail. - If starts with
__and closing exists → underline branch (same structure). - If starts with
[→ parse tag name, apply attribute chain for body until[/], recurse tail. - Else consume one code unit and recurse (literal accumulation).
Console.FormatLine integration
Section titled “Console.FormatLine integration”Format(text) → System.Output.WriteLine(styled) per Console I/O streams.
Verification
Section titled “Verification”See the verification and traceability article in this bundle and compiler/corelib/beskid_corelib/tests/corelib_tests/src/console/.
Related topics
Section titled “Related topics”- Parent feature hub and Terminal and console area