A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://rich.readthedocs.io/en/latest/reference/markup.html below:

Website Navigation


rich.markup — Rich 14.0.0 documentation

rich.markup
class rich.markup.Tag(name, parameters)[source]

A tag in console markup.

Parameters:
  • name (str)

  • parameters (str | None)

property markup: str

Get the string representation of this tag.

name: str

The tag name. e.g. ‘bold’.

parameters: str | None

Any additional parameters after the name.

rich.markup.escape(markup, _escape=<built-in method sub of re.Pattern object>)[source]

Escapes text so that it won’t be interpreted as markup.

Parameters:
Returns:

Markup with square brackets escaped.

Return type:

str

rich.markup.render(markup, style='', emoji=True, emoji_variant=None)[source]

Render console markup in to a Text instance.

Parameters:
  • markup (str) – A string containing console markup.

  • style (str | Style) – (Union[str, Style]): The style to use.

  • emoji (bool, optional) – Also render emoji code. Defaults to True.

  • emoji_variant (str, optional) – Optional emoji variant, either “text” or “emoji”. Defaults to None.

Raises:

MarkupError – If there is a syntax error in the markup.

Returns:

A test instance.

Return type:

Text


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4