diff options
author | Waylan Limberg <waylan@gmail.com> | 2013-02-19 16:33:36 -0500 |
---|---|---|
committer | Waylan Limberg <waylan@gmail.com> | 2013-02-19 16:33:36 -0500 |
commit | 8aa2fc7b5138fd97ded7dd1e70103532a9fd6583 (patch) | |
tree | a85aec909892c3e9ca08d23369f0e743e3beb177 /docs/extensions/code_hilite.txt | |
parent | 3b732805676969fdf61ac3214c42ab94e96da0ea (diff) | |
download | markdown-8aa2fc7b5138fd97ded7dd1e70103532a9fd6583.tar.gz markdown-8aa2fc7b5138fd97ded7dd1e70103532a9fd6583.tar.bz2 markdown-8aa2fc7b5138fd97ded7dd1e70103532a9fd6583.zip |
Various changes to docs for updated changes, clarity, and to fix typos.
Diffstat (limited to 'docs/extensions/code_hilite.txt')
-rw-r--r-- | docs/extensions/code_hilite.txt | 30 |
1 files changed, 17 insertions, 13 deletions
diff --git a/docs/extensions/code_hilite.txt b/docs/extensions/code_hilite.txt index 31ecfbb..57f81ca 100644 --- a/docs/extensions/code_hilite.txt +++ b/docs/extensions/code_hilite.txt @@ -30,8 +30,9 @@ language. When that fails, the code block will display as un-highlighted code. [dl]: http://pygments.org/download/ [documentation]: http://pygments.org/docs -**Note:** The css and/or javascript is not included as part of this extension -but shall always be provided by the end user. +!!! Note + The css and/or javascript is not included as part of this extension + but shall always be provided by the end user. Syntax ------ @@ -42,11 +43,11 @@ the code block. There are three ways to tell the hiliter what language the code block contains and each one has a different result. !!! Note -The format of the language identifier only effects the display of line numbers -if `linenums` is set to `None` (the default). If set to `True` or `False` -(see [Usage](#usage) below) the format of the identifier has no effect on the -display of line numbers -- it only serves as a means to define the language -of the code block. + The format of the language identifier only effects the display of line numbers + if `linenums` is set to `None` (the default). If set to `True` or `False` + (see [Usage](#usage) below) the format of the identifier has no effect on the + display of line numbers -- it only serves as a means to define the language + of the code block. [syntax]: http://daringfireball.net/projects/markdown/syntax#precode @@ -93,10 +94,8 @@ Will result in: ###When No Language is Defined CodeHilite is completely backward compatible so that if a code block is -encountered that does not define a language, the block is simple wrapped in -`<pre>` tags and output. Note: one exception would be that the Pygments -highlighting engine will try to guess the language. Upon failure, the same -behavior will happen as described here. +encountered that does not define a language, the block is simply wrapped in +`<pre>` tags and output. # Code goes here ... @@ -106,9 +105,14 @@ Will result in: Lets see the source for that: - <div class="codehilite" ><pre><code># Code goes here ... + <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. + Usage ----- @@ -131,7 +135,7 @@ SheBangs (`#!`) for language identification, set `linenums` to `False`. ... ) If you want to prevent Pygments from guessing the language, only highlighting -blocks when you explicitly request it, set the `guess_lang` setting to 'False'. +blocks when you explicitly request it, set the `guess_lang` setting to `False`. >>> html = markdown.markdown(text, ... extensions=['codehilite(guess_lang=False)'] |