Skip to content

Commit a23ba4d

Browse files
committed
Add documentation for smarty extension
1 parent 61066d4 commit a23ba4d

File tree

5 files changed

+63
-4
lines changed

5 files changed

+63
-4
lines changed

docs/extensions/index.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ Extension | "Name"
5353
[Meta-Data] | `meta`
5454
[New Line to Break] | `nl2br`
5555
[Sane Lists] | `sane_lists`
56+
[SmartyPants] | `smarty`
5657
[Table of Contents] | `toc`
5758
[WikiLinks] | `wikilinks`
5859

@@ -70,6 +71,7 @@ Extension | "Name"
7071
[Meta-Data]: meta_data.html
7172
[New Line to Break]: nl2br.html
7273
[Sane Lists]: sane_lists.html
74+
[SmartyPants]: smarty.html
7375
[Table of Contents]: toc.html
7476
[WikiLinks]: wikilinks.html
7577

docs/extensions/sane_lists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
title: Sane Lists Extension
22
prev_title: New Line to Break Extension
33
prev_url: nl2br.html
4-
next_title: Table of Contents Extension
5-
next_url: toc.html
4+
next_title: SmartyPants Extension
5+
next_url: smarty.html
66

77
Sane Lists
88
==========

docs/extensions/smarty.txt

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
title: SmartyPants Extension
2+
prev_title: Sane Lists Extension
3+
prev_url: sane_lists.html
4+
next_title: Table of Contents Extension
5+
next_url: toc.html
6+
7+
SmartyPants
8+
===========
9+
10+
Summary
11+
-------
12+
13+
The SmartyPants extension converts ASCII dashes, quotes and ellipses to
14+
their HTML entity equivalents.
15+
16+
ASCII symbol | Unicode replacements
17+
------------ | --------------------
18+
' | ‘ ’
19+
" | “ ”
20+
\... | …
21+
\-- | –
22+
-\-- | —
23+
24+
Arguments
25+
---------
26+
27+
All three arguments are set to `True` by default.
28+
29+
Argument | Description
30+
-------- | -----------
31+
`smart_dashes` | whether to convert dashes
32+
`smart_quotes` | whether to convert quotes
33+
`smart_ellipses` | whether to convert ellipses
34+
35+
Usage
36+
-----
37+
38+
Default configuration:
39+
40+
>>> html = markdown.markdown(text,
41+
... extensions=['smarty']
42+
... )
43+
44+
Disable quotes convertation:
45+
46+
>>> html = markdown.markdown(text,
47+
... extensions=['smarty(smart_quotes=False)']
48+
... )
49+
50+
Further reading
51+
---------------
52+
53+
SmartyPants extension is based on the original SmartyPants implementation
54+
by John Gruber. Please read it's [documentation][1] for details.
55+
56+
[1]: http://daringfireball.net/projects/smartypants/

docs/extensions/toc.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
title: Table of Contents Extension
2-
prev_title: Sane Lists Extension
3-
prev_url: sane_lists.html
2+
prev_title: SmartyPants Extension
3+
prev_url: smarty.html
44
next_title: Wikilinks Extension
55
next_url: wikilinks.html
66

docs/siteindex.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ Table of Contents
4444
* [Meta-Data](extensions/meta_data.html)
4545
* [New Line to Break](extensions/nl2br.html)
4646
* [Sane Lists](extensions/sane_lists.html)
47+
* [SmartyPants](extensions/smarty.html)
4748
* [Table of Contents](extensions/toc.html)
4849
* [WikiLinks](extensions/wikilinks.html)
4950
* [Third Party Extensions](extensions/index.html#third-party-extensions)

0 commit comments

Comments
 (0)