Console.Format targets terminal styling, not a document renderer.
Design model
Platform spec article
Design model
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 design model 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”Pipeline
Section titled “Pipeline”- Scan —
Console.Format.Scanprovides length, prefix, slice, and index helpers (no allocation-heavy regex engine). - Parse —
Markdown.RenderInnerwalks the source recursively for**,__,\escapes, and bracket tags. - Style —
Attributes/StyleChainmap names (red,bold) toAnsi.Sgror chain steps. - Emit — Concatenated gated escape prefixes wrap plain text segments.
Plain vs styled
Section titled “Plain vs styled”| Entry | ansi flag | Use |
|---|---|---|
RenderPlain | false | Logs and non-TTY snapshots |
RenderStyled / Format | true | Interactive terminal UI |
Escape authority
Section titled “Escape authority”Sequence bytes are defined in ANSI escape model; markup must not embed raw ESC except via the Ansi builders.
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