Open nschloe opened 11 months ago
MWE:
import mistune from rich import print markdown = mistune.create_markdown( renderer="ast", plugins=["math"], ) tokens = markdown("$`a+%\nb`$") print(tokens)
Output:
[ { 'type': 'paragraph', 'children': [ {'type': 'text', 'raw': '$'}, {'type': 'codespan', 'raw': 'a+% b'}, {'type': 'text', 'raw': '$'} ] } ]
MWE:
Output: