Skip to content

Commit

Permalink
Add documentation for smarty extension
Browse files Browse the repository at this point in the history
  • Loading branch information
mitya57 committed Jul 26, 2013
1 parent 61066d4 commit a23ba4d
Show file tree
Hide file tree
Showing 5 changed files with 63 additions and 4 deletions.
2 changes: 2 additions & 0 deletions docs/extensions/index.txt
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ Extension | "Name"
[Meta-Data] | `meta`
[New Line to Break] | `nl2br`
[Sane Lists] | `sane_lists`
[SmartyPants] | `smarty`
[Table of Contents] | `toc`
[WikiLinks] | `wikilinks`

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

Expand Down
4 changes: 2 additions & 2 deletions docs/extensions/sane_lists.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
title: Sane Lists Extension
prev_title: New Line to Break Extension
prev_url: nl2br.html
next_title: Table of Contents Extension
next_url: toc.html
next_title: SmartyPants Extension
next_url: smarty.html

Sane Lists
==========
Expand Down
56 changes: 56 additions & 0 deletions docs/extensions/smarty.txt
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/
4 changes: 2 additions & 2 deletions docs/extensions/toc.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
title: Table of Contents Extension
prev_title: Sane Lists Extension
prev_url: sane_lists.html
prev_title: SmartyPants Extension
prev_url: smarty.html
next_title: Wikilinks Extension
next_url: wikilinks.html

Expand Down
1 change: 1 addition & 0 deletions docs/siteindex.txt
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ Table of Contents
* [Meta-Data](extensions/meta_data.html)
* [New Line to Break](extensions/nl2br.html)
* [Sane Lists](extensions/sane_lists.html)
* [SmartyPants](extensions/smarty.html)
* [Table of Contents](extensions/toc.html)
* [WikiLinks](extensions/wikilinks.html)
* [Third Party Extensions](extensions/index.html#third-party-extensions)
Expand Down

0 comments on commit a23ba4d

Please sign in to comment.