diff options
author | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2023-07-07 04:52:12 +0000 |
---|---|---|
committer | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2023-07-07 04:52:12 +0000 |
commit | 1e5312c01ce7246b883bdc580ae0a92bc9d66de4 (patch) | |
tree | 1a110fa9fa982e746b1969458c5b9d373c70a38c /docs/extensions/legacy_em.md | |
parent | e0ae7d50955861449eb995f2f5e1412fde1e5c8e (diff) | |
parent | b8ef043a4bce3c0e0c3a83a5309c17d1962be972 (diff) | |
download | markdown-1e5312c01ce7246b883bdc580ae0a92bc9d66de4.tar.gz |
Snap for 10453563 from b8ef043a4bce3c0e0c3a83a5309c17d1962be972 to mainline-media-releaseaml_med_341711000aml_med_341619000aml_med_341513600aml_med_341312300aml_med_341312020aml_med_341111000aml_med_341011000aml_med_340922010android14-mainline-media-release
Change-Id: I021ab2574e0bc70425aee49ea94e466a9011b001
Diffstat (limited to 'docs/extensions/legacy_em.md')
-rw-r--r-- | docs/extensions/legacy_em.md | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/docs/extensions/legacy_em.md b/docs/extensions/legacy_em.md new file mode 100644 index 0000000..67c6cd0 --- /dev/null +++ b/docs/extensions/legacy_em.md @@ -0,0 +1,31 @@ +title: Legacy EM Extension + +# Legacy EM + +## Summary + +The Legacy EM extension restores Markdown's original behavior for emphasis and +strong syntax when using underscores. + +By default Python-Markdown treats `_connected_words_` intelligently by +recognizing that mid-word underscores should not be used for emphasis. In other +words, 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 behavior +of the reference implementation. Therefore, this extension can be used to better +match the reference implementation. With the extension enabled, the above input +would result in this output: `<em>connected</em>words_`. + +## Usage + +See [Extensions](index.md) for general extension usage. Use `legacy_em` as the +name of the extension. + +This extension does not accept any special configuration options. + +A trivial example: + +```python +markdown.markdown(some_text, extensions=['legacy_em']) +``` |