diff options
author | Martin Altmayer <altmayer@posteo.de> | 2014-08-11 19:45:09 +0200 |
---|---|---|
committer | Martin Altmayer <altmayer@posteo.de> | 2014-08-11 19:45:09 +0200 |
commit | af85029ca443609b803ebc83e806c1ee115db900 (patch) | |
tree | 5e6a683b4d7e85daed8ac298ff9c5e57eda5a126 /docs/extensions/smarty.txt | |
parent | 139e882437e7f3c7295973d0866afea24bbe926b (diff) | |
download | markdown-af85029ca443609b803ebc83e806c1ee115db900.tar.gz markdown-af85029ca443609b803ebc83e806c1ee115db900.tar.bz2 markdown-af85029ca443609b803ebc83e806c1ee115db900.zip |
Replaced smart_lsquo etc. by a single option smart_substitutions which allows to overwrite all substitution strings. Fixed line length in docs.
Diffstat (limited to 'docs/extensions/smarty.txt')
-rw-r--r-- | docs/extensions/smarty.txt | 26 |
1 files changed, 17 insertions, 9 deletions
diff --git a/docs/extensions/smarty.txt b/docs/extensions/smarty.txt index 394df5c..1c21d50 100644 --- a/docs/extensions/smarty.txt +++ b/docs/extensions/smarty.txt @@ -22,13 +22,24 @@ ASCII symbol | Replacements | HTML Entities `--` | – | `–` `---` | — | `—` -Using the options `smart_lsquo` etc. you can reconfigure the replacements for `'` and `"`. Use e.g. the following config to get correct quotes for the German language: +Using the configuration option 'smart_substitutions' you can overwrite the +default substitutions. Just pass a dict mapping (a subset of) the following +keys to the substitution strings. + + 'mdash', 'ndash', 'ellipsis', + 'left-angle-quote', 'right-angle-quote', + 'left-single-quote', 'right-single-quote', + 'left-double-quote', 'right-double-quote' + +Use e.g. the following config to get correct quotes for the German language: extensionConfigs = { - 'smarty': [('smart_lsquo', '‚'), # sb is not a typo! - ('smart_rsquo', '‘'), - ('smart_ldquo', '„'), - ('smart_rdquo', '“')] + 'smarty': [('smart_substitutions', { + 'left-single-quote': '‚', # sb is not a typo! + 'right-single-quote': '‘', + 'left-double-quote': '„', + 'right-double-quote': '“' + })] } !!! note @@ -60,10 +71,7 @@ Option | Default value | Description `smart_quotes` | enabled | whether to convert straight quotes `smart_angled_quotes` | disabled | whether to convert angled quotes `smart_ellipses` | enabled | whether to convert ellipses -`smart_lsquo` | ‘ | Replacement text for single left quote -`smart_rsquo` | ’ | Replacement text for single right quote -`smart_ldquo` | “ | Replacement text for double left quote -`smart_rdquo` | ” | Replacement text for double right quote +`smart_substitutions` | {} | Overwrite default substitutions Further reading --------------- |