forked from Python-Markdown/markdown
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add documentation for smarty extension
- Loading branch information
Showing
5 changed files
with
63 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
title: SmartyPants Extension | ||
prev_title: Sane Lists Extension | ||
prev_url: sane_lists.html | ||
next_title: Table of Contents Extension | ||
next_url: toc.html | ||
|
||
SmartyPants | ||
=========== | ||
|
||
Summary | ||
------- | ||
|
||
The SmartyPants extension converts ASCII dashes, quotes and ellipses to | ||
their HTML entity equivalents. | ||
|
||
ASCII symbol | Unicode replacements | ||
------------ | -------------------- | ||
' | ‘ ’ | ||
" | “ ” | ||
\... | … | ||
\-- | – | ||
-\-- | — | ||
|
||
Arguments | ||
--------- | ||
|
||
All three arguments are set to `True` by default. | ||
|
||
Argument | Description | ||
-------- | ----------- | ||
`smart_dashes` | whether to convert dashes | ||
`smart_quotes` | whether to convert quotes | ||
`smart_ellipses` | whether to convert ellipses | ||
|
||
Usage | ||
----- | ||
|
||
Default configuration: | ||
|
||
>>> html = markdown.markdown(text, | ||
... extensions=['smarty'] | ||
... ) | ||
|
||
Disable quotes convertation: | ||
|
||
>>> html = markdown.markdown(text, | ||
... extensions=['smarty(smart_quotes=False)'] | ||
... ) | ||
|
||
Further reading | ||
--------------- | ||
|
||
SmartyPants extension is based on the original SmartyPants implementation | ||
by John Gruber. Please read it's [documentation][1] for details. | ||
|
||
[1]: http://daringfireball.net/projects/smartypants/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters