diff options
author | Waylan Limberg <waylan@gmail.com> | 2014-08-29 22:18:10 -0400 |
---|---|---|
committer | Waylan Limberg <waylan@gmail.com> | 2014-08-29 22:18:10 -0400 |
commit | 5f941454f9f7c8b62efec24917b2c7ba983d603c (patch) | |
tree | f91ca2be452c6964d608b1e4d46b60d339e928ec /docs/extensions | |
parent | 3fda9d59fe0bd3a09c888ebadf92afffb2a74690 (diff) | |
download | markdown-5f941454f9f7c8b62efec24917b2c7ba983d603c.tar.gz markdown-5f941454f9f7c8b62efec24917b2c7ba983d603c.tar.bz2 markdown-5f941454f9f7c8b62efec24917b2c7ba983d603c.zip |
Some docs cleanup.
Diffstat (limited to 'docs/extensions')
-rw-r--r-- | docs/extensions/admonition.txt | 4 | ||||
-rw-r--r-- | docs/extensions/api.txt | 5 | ||||
-rw-r--r-- | docs/extensions/smarty.txt | 54 |
3 files changed, 29 insertions, 34 deletions
diff --git a/docs/extensions/admonition.txt b/docs/extensions/admonition.txt index 088b1fb..fcf866b 100644 --- a/docs/extensions/admonition.txt +++ b/docs/extensions/admonition.txt @@ -14,10 +14,6 @@ The Admonition extension adds [rST-style][rST] admonitions to Markdown documents This extension is included in the standard Markdown library. -!!! Warning - This Extension is experimental and subject to change without notice. - Consider yourself warned. - [rST]: http://docutils.sourceforge.net/docs/ref/rst/directives.html#specific-admonitions Syntax diff --git a/docs/extensions/api.txt b/docs/extensions/api.txt index 3b5a7c5..8837818 100644 --- a/docs/extensions/api.txt +++ b/docs/extensions/api.txt @@ -589,7 +589,8 @@ following methods available to assist in working with config settings: a boolean value except when it is `None`. No conversion takes place when the previous value of `key` is a string. -* **``setConfigs(items): +* **``setConfigs(items)``**: + Sets multiple config settings given a dict of key/value pairs. ### makeExtension {: #makeextension } @@ -611,7 +612,7 @@ within templates). The "name" of your extension must be a string consisting of the importable path to your module using Python's dot notation. Therefore, if you are providing a library -to your users and would like to include a custom markdown extensions within your +to your users and would like to include a custom markdown extension within your library, that extension would be named `"mylib.mdext.myext"` where `mylib/mdext/myext.py` contains the extension and the `mylib` directory is on the PYTHONPATH. diff --git a/docs/extensions/smarty.txt b/docs/extensions/smarty.txt index a1b8d6e..a0680af 100644 --- a/docs/extensions/smarty.txt +++ b/docs/extensions/smarty.txt @@ -13,33 +13,31 @@ Summary The SmartyPants extension converts ASCII dashes, quotes and ellipses to their HTML entity equivalents. -ASCII symbol | Replacements | HTML Entities ------------- | --------------- | ------------------- -`'` | ‘ ’ | `‘` `’` -`"` | “ ” | `“` `”` -`<< >>` | « » | `«` `»` -`...` | … | `…` -`--` | – | `–` -`---` | — | `—` +ASCII symbol | Replacements | HTML Entities | Substitution Keys +------------ | --------------- | ------------------- | ---------------------------------------- +`'` | ‘ ’ | `‘` `’` | `'left-single-quote'`, `'right-single-quote'` +`"` | “ ” | `“` `”` | `'left-double-quote'`, `'right-double-quote'` +`<< >>` | « » | `«` `»` | `'left-angle-quote'`, `'right-angle-quote'` +`...` | … | `…` | `'ellipsis'` +`--` | – | `–` | `'ndash'` +`---` | — | `—` | `'mdash'` Using the configuration option 'substitutions' you can overwrite the -default substitutions. Just pass a dict mapping (a subset of) the following +default substitutions. Just pass a dict mapping (a subset of) the keys to the substitution strings. - - 'mdash', 'ndash', 'ellipsis', - 'left-angle-quote', 'right-angle-quote', - 'left-single-quote', 'right-single-quote', - 'left-double-quote', 'right-double-quote' -Use e.g. the following config to get correct quotes for the German language: +For example, one might use the following config to get correct quotes for +the German language: extensionConfigs = { - 'smarty': [('substitutions', { - 'left-single-quote': '‚', # sb is not a typo! - 'right-single-quote': '‘', - 'left-double-quote': '„', - 'right-double-quote': '“' - })] + 'smarty': { + 'substitutions': { + 'left-single-quote': '‚', # sb is not a typo! + 'right-single-quote': '‘', + 'left-double-quote': '„', + 'right-double-quote': '“' + } + } } !!! note @@ -57,8 +55,8 @@ Use e.g. the following config to get correct quotes for the German language: Usage ----- -See [Extensions](index.html) for general extension usage, specify `markdown.extensions.smarty` -as the name of the extension. +See [Extensions](index.html) for general extension usage, specify +`markdown.extensions.smarty` as the name of the extension. See the [Library Reference](../reference.html#extensions) for information about configuring extensions. @@ -67,11 +65,11 @@ The following options are provided to configure the output: Option | Default value | Description ------ | ------------- | ----------- -`smart_dashes` | enabled | whether to convert dashes -`smart_quotes` | enabled | whether to convert straight quotes -`smart_angled_quotes` | disabled | whether to convert angled quotes -`smart_ellipses` | enabled | whether to convert ellipses -`substitutions` | {} | overwrite default substitutions +`smart_dashes` | `True` | whether to convert dashes +`smart_quotes` | `True` | whether to convert straight quotes +`smart_angled_quotes` | `False` | whether to convert angled quotes +`smart_ellipses` | `True` | whether to convert ellipses +`substitutions` | `{}` | overwrite default substitutions Further reading --------------- |