Updated README's instructions on delimited code blocks to include
information about syntax highlighting. git-svn-id: https://pandoc.googlecode.com/svn/trunk@1225 788f1e2b-df1e-0410-8736-df70ead52e1b
This commit is contained in:
parent
f8d16817c9
commit
f6ea504b83
1 changed files with 8 additions and 7 deletions
15
README
15
README
|
@ -733,7 +733,7 @@ row of tildes at the start and end:
|
|||
Optionally, you may specify the language of the code block using
|
||||
this syntax:
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ {.haskell}
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ {.haskell .numberLines}
|
||||
qsort [] = []
|
||||
qsort (x:xs) = qsort (filter (< x) xs) ++ [x] ++
|
||||
qsort (filter (>= x) xs)
|
||||
|
@ -741,7 +741,13 @@ this syntax:
|
|||
|
||||
Some output formats can use this information to do syntax highlighting.
|
||||
Currently, the only output format that uses this information is HTML.
|
||||
The code block above would appear in the context
|
||||
|
||||
If pandoc has been compiled with syntax highlighting support, then the
|
||||
code block above will appear highlighted, with numbered lines. (To see
|
||||
which languages are supported, do `pandoc --version`.)
|
||||
|
||||
If pandoc has not been compiled with syntax highlighting support, the
|
||||
code block above will appear as follows:
|
||||
|
||||
<pre class="haskell">
|
||||
<code>
|
||||
|
@ -749,11 +755,6 @@ The code block above would appear in the context
|
|||
</code>
|
||||
</pre>
|
||||
|
||||
This allows the HTML to be postprocessed using a syntax highlighting tool.
|
||||
(Pandoc itself does not do any syntax highlighting.) Note that multiple
|
||||
classes can be specified: for example, one might use `{.haskell
|
||||
.number}` to specify that lines be numbered in the highlighted output.
|
||||
|
||||
Title blocks
|
||||
------------
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue