The SmartyPants extension converts ASCII dashes, quotes and ellipses to their HTML entity equivalents.
ASCII symbol | Replacements | HTML Entities |
---|---|---|
' | ‘ ’ | ‘ ’ |
" | “ ” | “ ” |
... | … | … |
-- | – | – |
--- | — | — |
Note
This extension reimplements the Python SmartyPants library by intregated it into the markdown parser. While this does not provide any additional features, it does offer a few advantages. Notably, it will not try to work on highlighted code blocks (using the CodeHilite Extension) like the third party library has been known to do.
See Extensions for general extension usage, specify smarty
as the name of the extension.
See the Library Reference for information about configuring extensions.
The following options are provided to configure the output (all three are set to True
by default):
Option | Description |
---|---|
smart_dashes |
whether to convert dashes |
smart_quotes |
whether to convert quotes |
smart_ellipses |
whether to convert ellipses |
SmartyPants extension is based on the original SmartyPants implementation by John Gruber. Please read it’s documentation for details.