diff options
-rw-r--r-- | docs/cli.txt | 7 | ||||
-rw-r--r-- | docs/extensions/admonition.txt | 4 | ||||
-rw-r--r-- | docs/extensions/api.txt | 5 | ||||
-rw-r--r-- | docs/extensions/smarty.txt | 54 | ||||
-rw-r--r-- | docs/reference.txt | 11 | ||||
-rw-r--r-- | docs/release-2.4.txt | 4 | ||||
-rw-r--r-- | docs/release-2.5.txt | 28 |
7 files changed, 53 insertions, 60 deletions
diff --git a/docs/cli.txt b/docs/cli.txt index 7741d34..5098771 100644 --- a/docs/cli.txt +++ b/docs/cli.txt @@ -25,13 +25,6 @@ following format: That will run the module as a script with the options and args provided. -!!! Note - Unfortunately, Python 2.6 does not fully support the `-m` flag. Therefore, you - may need to specify the module in which the command line script exists - (`markdown.__main__`): - - $ python -m markdown.__main__ [options] [args] - At its most basic usage, one would simply pass in a file name as the only argument: $ python -m markdown input_file.txt 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 --------------- diff --git a/docs/reference.txt b/docs/reference.txt index afc3b05..e1797ad 100644 --- a/docs/reference.txt +++ b/docs/reference.txt @@ -68,7 +68,7 @@ The following options are available on the `markdown.markdown` function: extensions=[MyExtension(), 'path.to.my.ext'] - !!! warning + !!! note The prefered method is to pass in an instance of an extension. Strings should only be used when it is impossable to import the Extension Class directly (from the command line or in a template). @@ -101,9 +101,10 @@ The following options are available on the `markdown.markdown` function: "path.to.module:SomeExtensionClass" !!! note - You should only need to specify the class name if more than one extension is defined - within the same module. The extensions that come with Python-Markdown do *not* - need to have the class name specified. + You should only need to specify the class name if more than one extension + is defined within the same module. The extensions that come with + Python-Markdown do *not* need to have the class name specified. However, + doing so will not effect the behavior of the parser. When loading an extension by name (as a string), you may pass in configuration settings to the extension using the @@ -122,7 +123,7 @@ The following options are available on the `markdown.markdown` function: !!! Note The prefered method is to pass in an instance of an extension, which - does not require use of the `extension_configs` keyword at all. + does not require use of the `extension_configs` keyword at all. See the [extensions](#extensions) keyword for details. The dictionary of configuration settings must be in the following format: diff --git a/docs/release-2.4.txt b/docs/release-2.4.txt index 4f3043f..af2110b 100644 --- a/docs/release-2.4.txt +++ b/docs/release-2.4.txt @@ -1,6 +1,6 @@ title: Release Notes for v2.4 -prev_title: release-2.4.html -prev_url: change_log.html +prev_title: Release Notes for v2.5 +prev_url: release-2.5.html next_title: Release Notes for v2.3 next_url: release-2.3.html diff --git a/docs/release-2.5.txt b/docs/release-2.5.txt index 4083383..044fcb2 100644 --- a/docs/release-2.5.txt +++ b/docs/release-2.5.txt @@ -29,31 +29,31 @@ Backwards-incompatible Changes instead, which provides more control of the output. [CodeHilite Extension]: extensions/code_hilite.html -[linenumes]: extensions/code_hilite.html#usage +[linenums]: extensions/code_hilite.html#usage * In previous versions of Python-Markdown, the builtin extensions received - special status and did not require the full path to be provided. Additionaly, + special status and did not require the full path to be provided. Additionaly, third party extensions whose name started with "mdx_" received the same special treatment. This behavior will be deprecated in version 2.6 and will - raise a PendingDeprecationWarning in 2.5. Ensure that you always use the full + raise a `PendingDeprecationWarning` in 2.5. Ensure that you always use the full path to your extensions. For example, if you previously did the following: - markdown.markdown(text, extensions=['extra']) + markdown.markdown(text, extensions=['extra']) - You should change your code to the following: + You should change your code to the following: - markdown.markdown(text, extensions=['markdown.extensions.extra']) + markdown.markdown(text, extensions=['markdown.extensions.extra']) - The same applies to the command line: + The same applies to the command line: - $ python -m markdown -x markdown.extensions.extra input.txt + $ python -m markdown -x markdown.extensions.extra input.txt - See the [documentation](reference.html#extensions) for a full explaination - of the current behavior. + See the [documentation](reference.html#extensions) for a full explaination + of the current behavior. * The previously documented method of appending the extension configs as a string to the extension name will be deprecated in Python-Markdown - version 2.6 and will raise a PendingDeprecationWarning in 2.5. The + version 2.6 and will raise a `PendingDeprecationWarning` in 2.5. The [extension_configs](reference.html#extension_configs) keyword should be used instead. See the [documentation](reference.html#extension-configs) for a full explaination of the current behavior. @@ -112,7 +112,7 @@ What's New in Python-Markdown 2.5 See the [API] documentation for a full explaination. [ec]: reference.html#extension_configs -[API]: extensions/api.txt#configsettings +[API]: extensions/api.html#configsettings * The [Command Line Interface][cli] now accepts a `--extensions_config` (or `-c`) option which accepts a filename and passes the parsed content of a [YAML] or @@ -126,6 +126,10 @@ What's New in Python-Markdown 2.5 [JSON]: http://json.org/ [PyYAML]: http://pyyaml.org/ +* The [amonition extension][ae] is no longer considered "experimental." + +[ae]: extensions/admonition.html + * There have been various refactors of the testing framework. While those changes will not directly effect end users, the code is being better tested which will benefit everyone. |