diff options
author | Waylan Limberg <waylan@gmail.com> | 2013-02-27 12:52:02 -0500 |
---|---|---|
committer | Waylan Limberg <waylan@gmail.com> | 2013-02-27 12:52:02 -0500 |
commit | 26ebafb3b86b224c2acad29bf4d4314a3242189a (patch) | |
tree | eb3ae02a639e724b794319f8884698b14385f3a9 /docs/extensions | |
parent | 52613ceeed7b022a799be7b52775c8705133eca7 (diff) | |
download | markdown-26ebafb3b86b224c2acad29bf4d4314a3242189a.tar.gz markdown-26ebafb3b86b224c2acad29bf4d4314a3242189a.tar.bz2 markdown-26ebafb3b86b224c2acad29bf4d4314a3242189a.zip |
Tweaked the docs some more.
Diffstat (limited to 'docs/extensions')
-rw-r--r-- | docs/extensions/api.txt | 2 | ||||
-rw-r--r-- | docs/extensions/code_hilite.txt | 70 | ||||
-rw-r--r-- | docs/extensions/index.txt | 2 |
3 files changed, 37 insertions, 37 deletions
diff --git a/docs/extensions/api.txt b/docs/extensions/api.txt index ac840f9..bc06154 100644 --- a/docs/extensions/api.txt +++ b/docs/extensions/api.txt @@ -594,7 +594,7 @@ the module and call the `makeExtension` function to initiate your extension. 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 with your +to your users and would like to include a custom markdown extensions within your library, that extension would be named `"mylib.mdext.myext"` where `mylib/mdext/myext.py` contains the `makeExtension` function and the `mylib` directory is on the PYTHONPATH. diff --git a/docs/extensions/code_hilite.txt b/docs/extensions/code_hilite.txt index 57f81ca..2e15e58 100644 --- a/docs/extensions/code_hilite.txt +++ b/docs/extensions/code_hilite.txt @@ -51,67 +51,67 @@ block contains and each one has a different result. [syntax]: http://daringfireball.net/projects/markdown/syntax#precode -###SheBang (with path) +* ###SheBang (with path) -If the first line of the codeblock contains a shebang, the language is derived -from that and line numbers are used. + If the first line of the codeblock contains a shebang, the language is derived + from that and line numbers are used. + + #!/usr/bin/python + # Code goes here ... + + Will result in: #!/usr/bin/python # Code goes here ... -Will result in: - #!/usr/bin/python - # Code goes here ... +* ###SheBang (no path) + If the first line contains a shebang, but the shebang line does not contain a + path (a single `/` or even a space), then that line is removed from the code + block before processing. Line numbers are used. -###SheBang (no path) + #!python + # Code goes here ... -If the first line contains a shebang, but the shebang line does not contain a -path (a single `/` or even a space), then that line is removed from the code -block before processing. Line numbers are used. + Will result in: - #!python # Code goes here ... -Will result in: +* ###Colons - # Code goes here ... + If the first line begins with three or more colons, the text following the + colons identifies the language. The first line is removed from the code block + before processing and line numbers are not used. -####Colons + :::python + # Code goes here ... -If the first line begins with three or more colons, the text following the -colons identifies the language. The first line is removed from the code block -before processing and line numbers are not used. + Will result in: - :::python # Code goes here ... -Will result in: +* ###When No Language is Defined - # Code goes here ... + CodeHilite is completely backward compatible so that if a code block is + encountered that does not define a language, the block is simply wrapped in + `<pre>` tags and output. -###When No Language is Defined + # Code goes here ... -CodeHilite is completely backward compatible so that if a code block is -encountered that does not define a language, the block is simply wrapped in -`<pre>` tags and output. + Will result in: # Code goes here ... -Will result in: - - # Code goes here ... + Lets see the source for that: -Lets see the source for that: + <div class="codehilite"><pre><code># Code goes here ... + </code></pre></div> - <div class="codehilite"><pre><code># Code goes here ... - </code></pre></div> - -!!! Note - When no language is defined, the Pygments highlighting engine will try to guess - the language (unless `guess_lang` is set to `False`). Upon failure, the same - behavior will happen as described above. + !!! Note + When no language is defined, the Pygments highlighting engine will try to guess + the language (unless `guess_lang` is set to `False`). Upon failure, the same + behavior will happen as described above. Usage ----- diff --git a/docs/extensions/index.txt b/docs/extensions/index.txt index 99ca8c7..934c1d6 100644 --- a/docs/extensions/index.txt +++ b/docs/extensions/index.txt @@ -20,7 +20,7 @@ See the [Library Reference](../reference.html#extensions) for more details. From the command line, specify an extension with the `-x` option. - python -m markdown -x footnotes -x tables input.txt > output.html + $ python -m markdown -x footnotes -x tables input.txt > output.html See the [Command Line docs](../cli.html) or use the `--help` option for more details. |