Skip to content
Beskid Platform specification

Beskid

Jump to a Beskid service

Beskid

Jump to a Beskid service

Console markup format

Platform spec feature

Console markup format

Spec standingStandard

Owner
Piotr Mikstacki
Submitter
Piotr Mikstacki

What this feature specifies

Console.Format turns console markup (lightweight sigils and markdown subset) into UTF-8 strings containing optional ANSI sequences. Parsing lives in Console.Format.Scan and Console.Format.Markdown; attributes map through Console.Format.Attributes and Ansi.StyleChain.

Contract statement

  • Format(text) must use styled rendering when Console.ShouldStyle() is true (alias of ShouldEmitAnsi()).
  • RenderPlain must never emit escapes.
  • Supported sigils in v1 include bracket color tags ([red]), **bold**, __underline__, and related scan rules covered by tests.
  • Rendered output must pass through capability gating before syscall write (via Ansi.Escape.WhenEnabled / EmitCsi).

Implementation anchors

  • compiler/corelib/packages/console/src/Console/Format.bd
  • compiler/corelib/packages/console/src/Console/Format/Markdown.bd, Attributes.bd, Scan.bd
  • Tests: FormatMarkdownTests.bd, FormatAttributesTests.bd

No open decisions. Closed choices are normative ADRs under adr/ (D-CORE-TERM-0030, D-CORE-TERM-0031); use the reader ADRs tab for expandable detail.

Articles