aboutsummaryrefslogtreecommitdiffstats
path: root/docs/extensions/fenced_code_blocks.txt
diff options
context:
space:
mode:
authorA. Jesse Jiryu Davis <jesse@10gen.com>2014-01-07 12:57:05 -0500
committerA. Jesse Jiryu Davis <jesse@10gen.com>2014-01-07 12:57:05 -0500
commitf6b4f7c74dc4215847008cb8a59c03e63b9268e0 (patch)
tree7ebf868470de318c1cfacf53a83647b025a877d2 /docs/extensions/fenced_code_blocks.txt
parent1fca2a3b2d65bc013e22f7c00c503ea7cea7f72d (diff)
downloadmarkdown-f6b4f7c74dc4215847008cb8a59c03e63b9268e0.tar.gz
markdown-f6b4f7c74dc4215847008cb8a59c03e63b9268e0.tar.bz2
markdown-f6b4f7c74dc4215847008cb8a59c03e63b9268e0.zip
Document hl_lines feature for fenced_code and codehilite extensions.
Diffstat (limited to 'docs/extensions/fenced_code_blocks.txt')
-rw-r--r--docs/extensions/fenced_code_blocks.txt25
1 files changed, 25 insertions, 0 deletions
diff --git a/docs/extensions/fenced_code_blocks.txt b/docs/extensions/fenced_code_blocks.txt
index c54c5bd..0148c80 100644
--- a/docs/extensions/fenced_code_blocks.txt
+++ b/docs/extensions/fenced_code_blocks.txt
@@ -35,6 +35,8 @@ Fenced code blocks can have a blank line as the first and/or last line of a
code block and they can also come immediately after a list item without becoming
part of the list.
+### Language
+
In addition to PHP Extra's syntax, you can define the language of the code
block for use by syntax highlighters etc. The language will be assigned as a
class attribute of the ``<code>`` element in the output. Therefore, you should
@@ -66,6 +68,29 @@ The above will output:
[Github]: http://github.github.com/github-flavored-markdown/
+### Emphasized Lines
+
+If [Pygments][] is installed, this extension can emphasize certain lines of
+code. By default, emphasized lines have a yellow background. This is useful to
+direct the reader's attention. The lines can be specified with PHP Extra's
+syntax:
+
+ ~~~~{.python hl_lines="1 3"}
+ # This line is emphasized
+ # This line isn't
+ # This line is emphasized
+
+... or with GitHub's:
+
+ ```python hl_lines="1 3"
+ # This line is emphasized
+ # This line isn't
+ # This line is emphasized
+
+(`hl_lines` is named for Pygments' "highlighted lines" option.)
+
+[Pygments]: http://pygments.org/
+
Usage
-----