Воркед
This commit is contained in:
1 parent
ac32c55ab9
commit
ee94d8e529
1138 files changed
+55771
-77901
No files matched your search
@@ -64,6 +64,9 @@ def escape(
|
||||
return f"{backslashes}{backslashes}\\{text}"
|
||||
|
||||
markup = _escape(escape_backslashes, markup)
|
||||
if markup.endswith("\\") and not markup.endswith("\\\\"):
|
||||
return markup + "\\"
|
||||
|
||||
return markup
|
||||
|
||||
|
||||
@@ -110,7 +113,10 @@ def render(
|
||||
|
||||
Args:
|
||||
markup (str): A string containing console markup.
|
||||
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.
|
||||
@@ -226,7 +232,6 @@ def render(
|
||||
|
||||
|
||||
if __name__ == "__main__": # pragma: no cover
|
||||
|
||||
MARKUP = [
|
||||
"[red]Hello World[/red]",
|
||||
"[magenta]Hello [b]World[/b]",
|
||||
|
||||
Reference in new issue
Block a user