You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The following string "| Simple | Table |\n| ------ | -----" or similar ones that are incomplete tables will generate AssertionError rather than printing the string.
fromrich.consoleimportConsolefromrich.markdownimportMarkdown# This will workresponses="| Simple | Table |\n| ------ | ----- |\n| cell1 | cell2 |"# This will not workresponses="| Simple | Table |\n| ------ | ----- "console=Console()
md=Markdown(responses)
console.print(md)
Results:
Traceback (most recent call last):
File "/Users/justin/src/mchat/rtest.py", line 12, in <module>
console.print(md)
File "/Users/justin/Library/Caches/pypoetry/virtualenvs/mchat-mvZqEniY-py3.11/lib/python3.11/site-packages/rich/console.py", line 1699, in print
extend(render(renderable, render_options))
File "/Users/justin/Library/Caches/pypoetry/virtualenvs/mchat-mvZqEniY-py3.11/lib/python3.11/site-packages/rich/console.py", line 1331, in render
for render_output in iter_render:
File "/Users/justin/Library/Caches/pypoetry/virtualenvs/mchat-mvZqEniY-py3.11/lib/python3.11/site-packages/rich/markdown.py", line 686, in __rich_console__
yield from console.render(element, context.options)
File "/Users/justin/Library/Caches/pypoetry/virtualenvs/mchat-mvZqEniY-py3.11/lib/python3.11/site-packages/rich/console.py", line 1331, in render
for render_output in iter_render:
File "/Users/justin/Library/Caches/pypoetry/virtualenvs/mchat-mvZqEniY-py3.11/lib/python3.11/site-packages/rich/markdown.py", line 262, in __rich_console__
assert self.body is not None
^^^^^^^^^^^^^^^^^^^^^
AssertionError
Moved from here
The following string
"| Simple | Table |\n| ------ | -----"
or similar ones that are incomplete tables will generate AssertionError rather than printing the string.Results:
Platform
Click to expand
MacOS 13.4.1
The text was updated successfully, but these errors were encountered: