aboutsummaryrefslogtreecommitdiffstats
path: root/docs/extensions/smarty.txt
diff options
context:
space:
mode:
authorMartin Altmayer <altmayer@posteo.de>2014-08-09 09:47:57 +0200
committerMartin Altmayer <altmayer@posteo.de>2014-08-09 09:47:57 +0200
commit139e882437e7f3c7295973d0866afea24bbe926b (patch)
treeeee21cce1e32acc78343e11dd7db5288d184b535 /docs/extensions/smarty.txt
parent44cf8ce39936d7c045c58c550ad7cd21f9d59760 (diff)
downloadmarkdown-139e882437e7f3c7295973d0866afea24bbe926b.tar.gz
markdown-139e882437e7f3c7295973d0866afea24bbe926b.tar.bz2
markdown-139e882437e7f3c7295973d0866afea24bbe926b.zip
Added options to the Smarty extension that configure the text that is used to replace quotes. This makes it possible to use the correct quotes in languages other than English.
Diffstat (limited to 'docs/extensions/smarty.txt')
-rw-r--r--docs/extensions/smarty.txt13
1 files changed, 13 insertions, 0 deletions
diff --git a/docs/extensions/smarty.txt b/docs/extensions/smarty.txt
index 56e9bd5..394df5c 100644
--- a/docs/extensions/smarty.txt
+++ b/docs/extensions/smarty.txt
@@ -22,6 +22,15 @@ ASCII symbol | Replacements | HTML Entities
`--` | &ndash; | `&ndash;`
`---` | &mdash; | `&mdash;`
+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:
+
+ extensionConfigs = {
+ 'smarty': [('smart_lsquo', '&sbquo;'), # sb is not a typo!
+ ('smart_rsquo', '&lsquo;'),
+ ('smart_ldquo', '&bdquo;'),
+ ('smart_rdquo', '&ldquo;')]
+ }
+
!!! note
This extension reimplements the Python [SmartyPants]
library by intregated it into the markdown parser.
@@ -51,6 +60,10 @@ 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` | &lsquo; | Replacement text for single left quote
+`smart_rsquo` | &rsquo; | Replacement text for single right quote
+`smart_ldquo` | &ldquo; | Replacement text for double left quote
+`smart_rdquo` | &rdquo; | Replacement text for double right quote
Further reading
---------------