Closed nv1t closed 4 months ago
The extras
kwarg format is a mapping of extra names to configuration values, as seen in the example above. It can also be supplied as a list of extra names, which is sufficient in most examples.
# this example is valid
markdown2.markdown(text, extras=['fenced-code-blocks', 'breaks'])
# this is equivalent to the above example and is what is used generated inside the Markdown class
markdown2.markdown(text, extras={'fenced-code-blocks': None, 'breaks': None})
# this version supplies additional configuration to the `breaks` extra
markdown2.markdown(text, extras={'breaks': {'on_newline': True, 'on_backslash': True}})
The Extras wiki page has a section on this as well
The Documentation for the extra "Line breaks" states the usage as
That is the only place in the documentation where "extras" argument is a dictionary. This is not clear on what to do here?