| 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 |
!!! Note |
| 21 |
|
| 22 |
This extension is in __maintenance mode__. We will continue to fix bugs |
| 23 |
and keep it up-to-date with the core parser, but no new features or |
| 24 |
changes in behavior will be made. If you need a feature that this |
| 25 |
extension does not offer, then you have three options (1) find an |
| 26 |
existing [third-party extension] which meets your needs, (2) [build your |
| 27 |
own extension], or (3) fork this extension (pursuant to its licensing |
| 28 |
requirements) and maintain it as a third-party extension. |
| 29 |
|
| 30 |
[third-party extension]: index.md#third-party-extensions |
| 31 |
[build your own extension]: api.md |
| 32 |
|
| 33 |
## Usage |
| 34 |
|
| 35 |
See [Extensions](index.md) for general extension usage. Use `legacy_em` as the |
| 36 |
name of the extension. |
| 37 |
|
| 38 |
This extension does not accept any special configuration options. |
| 39 |
|
| 40 |
A trivial example: |
| 41 |
|
| 42 |
```python |
| 43 |
markdown.markdown(some_text, extensions=['legacy_em']) |
| 44 |
``` |