Skip to main content

Module markup

Module markup 

Source
Expand description

BBCode-like markup parser: [bold red]text[/bold red]. Console markup parser — equivalent to Rich’s markup.py.

Supports Rich’s BBCode-like markup syntax:

  • [bold]text[/bold] — apply bold
  • [red]text[/red] — set color
  • [on blue]text[/on blue] — set background
  • [bold red on blue]text[/] — combined styling
  • [/] — close all open tags
  • [[ — literal [

Structs§

Tag
A parsed markup tag.

Functions§

escape
Escape text so it won’t be interpreted as markup.
render
Parse markup and return a Text with applied styles.