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/code_hilite.txt | |
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/code_hilite.txt')
-rw-r--r-- | docs/extensions/code_hilite.txt | 70 |
1 files changed, 35 insertions, 35 deletions
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 ----- |