textual.markup
Utilities related to content markup.
parse_style
¶
to_content
¶
to_content(markup, style='', template_variables=None)
Convert markup to Content.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
|
str
|
String containing markup. |
required |
|
str | Style
|
Optional base style. |
''
|
|
Mapping[str, object] | None
|
Mapping of string.Template variables |
None
|
Raises:
Type | Description |
---|---|
MarkupError
|
If the markup is invalid. |
Returns:
Type | Description |
---|---|
Content
|
Content that renders the markup. |