diff options
author | Waylan Limberg <waylan@gmail.com> | 2014-08-29 22:18:10 -0400 |
---|---|---|
committer | Waylan Limberg <waylan@gmail.com> | 2014-08-29 22:18:10 -0400 |
commit | 5f941454f9f7c8b62efec24917b2c7ba983d603c (patch) | |
tree | f91ca2be452c6964d608b1e4d46b60d339e928ec /docs/extensions/smarty.txt | |
parent | 3fda9d59fe0bd3a09c888ebadf92afffb2a74690 (diff) | |
download | markdown-5f941454f9f7c8b62efec24917b2c7ba983d603c.tar.gz markdown-5f941454f9f7c8b62efec24917b2c7ba983d603c.tar.bz2 markdown-5f941454f9f7c8b62efec24917b2c7ba983d603c.zip |
Some docs cleanup.
Diffstat (limited to 'docs/extensions/smarty.txt')
-rw-r--r-- | docs/extensions/smarty.txt | 54 |
1 files changed, 26 insertions, 28 deletions
diff --git a/docs/extensions/smarty.txt b/docs/extensions/smarty.txt index a1b8d6e..a0680af 100644 --- a/docs/extensions/smarty.txt +++ b/docs/extensions/smarty.txt @@ -13,33 +13,31 @@ Summary The SmartyPants extension converts ASCII dashes, quotes and ellipses to their HTML entity equivalents. -ASCII symbol | Replacements | HTML Entities ------------- | --------------- | ------------------- -`'` | ‘ ’ | `‘` `’` -`"` | “ ” | `“` `”` -`<< >>` | « » | `«` `»` -`...` | … | `…` -`--` | – | `–` -`---` | — | `—` +ASCII symbol | Replacements | HTML Entities | Substitution Keys +------------ | --------------- | ------------------- | ---------------------------------------- +`'` | ‘ ’ | `‘` `’` | `'left-single-quote'`, `'right-single-quote'` +`"` | “ ” | `“` `”` | `'left-double-quote'`, `'right-double-quote'` +`<< >>` | « » | `«` `»` | `'left-angle-quote'`, `'right-angle-quote'` +`...` | … | `…` | `'ellipsis'` +`--` | – | `–` | `'ndash'` +`---` | — | `—` | `'mdash'` Using the configuration option 'substitutions' you can overwrite the -default substitutions. Just pass a dict mapping (a subset of) the following +default substitutions. Just pass a dict mapping (a subset of) the 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: +For example, one might use the following config to get correct quotes for +the German language: extensionConfigs = { - 'smarty': [('substitutions', { - 'left-single-quote': '‚', # sb is not a typo! - 'right-single-quote': '‘', - 'left-double-quote': '„', - 'right-double-quote': '“' - })] + 'smarty': { + 'substitutions': { + 'left-single-quote': '‚', # sb is not a typo! + 'right-single-quote': '‘', + 'left-double-quote': '„', + 'right-double-quote': '“' + } + } } !!! note @@ -57,8 +55,8 @@ Use e.g. the following config to get correct quotes for the German language: Usage ----- -See [Extensions](index.html) for general extension usage, specify `markdown.extensions.smarty` -as the name of the extension. +See [Extensions](index.html) for general extension usage, specify +`markdown.extensions.smarty` as the name of the extension. See the [Library Reference](../reference.html#extensions) for information about configuring extensions. @@ -67,11 +65,11 @@ The following options are provided to configure the output: Option | Default value | Description ------ | ------------- | ----------- -`smart_dashes` | enabled | whether to convert dashes -`smart_quotes` | enabled | whether to convert straight quotes -`smart_angled_quotes` | disabled | whether to convert angled quotes -`smart_ellipses` | enabled | whether to convert ellipses -`substitutions` | {} | overwrite default substitutions +`smart_dashes` | `True` | whether to convert dashes +`smart_quotes` | `True` | whether to convert straight quotes +`smart_angled_quotes` | `False` | whether to convert angled quotes +`smart_ellipses` | `True` | whether to convert ellipses +`substitutions` | `{}` | overwrite default substitutions Further reading --------------- |