Debian Codegraph @

docs/extensions/legacy_em.md

raw
1 title: Legacy EM Extension
2
3 # Legacy EM
4
5 ## Summary
6
7 The Legacy EM extension restores Markdown's original behavior for emphasis and
8 strong syntax when using underscores.
9
10 By default Python-Markdown treats `_connected_words_` intelligently by
11 recognizing that mid-word underscores should not be used for emphasis. In other
12 words, by default, that input would result in this output:
13 `<em>connected_words</em>`.
14
15 However, that behavior is not consistent with the original rules or the behavior
16 of the reference implementation. Therefore, this extension can be used to better
17 match the reference implementation. With the extension enabled, the above input
18 would result in this output: `<em>connected</em>words_`.
19
20 ## Usage
21
22 See [Extensions](index.md) for general extension usage. Use `legacy_em` as the
23 name of the extension.
24
25 This extension does not accept any special configuration options.
26
27 A trivial example:
28
29 ```python
30 markdown.markdown(some_text, extensions=['legacy_em'])
31 ```