Legacy EM¶
Summary¶
The Legacy EM extension restores Markdown’s original behavior for emphasis andstrong syntax when using underscores.
By default Python-Markdown treats_connected_words_ intelligently byrecognizing that mid-word underscores should not be used for emphasis. In otherwords, by default, that input would result in this output:<em>connected_words</em>.
However, that behavior is not consistent with the original rules or the behaviorof the reference implementation. Therefore, this extension can be used to bettermatch the reference implementation. With the extension enabled, the above inputwould result in this output:<em>connected</em>words_.
Usage¶
SeeExtensions for general extension usage. Uselegacy_em as thename of the extension.
This extension does not accept any special configuration options.
A trivial example:
markdown.markdown(some_text, extensions=['legacy_em'])
