Console.Format targets terminal styling, not a document renderer.
Contracts and edge cases
Platform spec article
Contracts and edge cases
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 contracts and edge cases 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”Normative requirements
Section titled “Normative requirements”| ID | Requirement |
|---|---|
| FMT-001 | Unclosed ** or __ spans must fall through as literal text (no panic). |
| FMT-002 | Unknown bracket tag names must render as literal [name] text. |
| FMT-003 | Backslash before a recognized sigil must emit the sigil literally and continue parsing. |
| FMT-004 | Format must delegate to styled render only when ShouldStyle() is true. |
| FMT-005 | Each styled span should reset attributes after the span (StyleChain / SGR reset). |
Supported constructs (v1)
Section titled “Supported constructs (v1)”| Construct | Effect when styled |
|---|---|
**text** | Bold |
__text__ | Underline |
[red]text[/] | Foreground palette (name table in Attributes.bd) |
\[ etc. | Escape sigil |
Edge cases
Section titled “Edge cases”- Nested styles apply inner chain then outer tail recursively.
- Empty source returns
"". - Markup does not interpret HTML or full Markdown block syntax (headings, lists).
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