aboutsummaryrefslogtreecommitdiffstats
path: root/docs/extensions/code_hilite.txt
diff options
context:
space:
mode:
authorWaylan Limberg <waylan@gmail.com>2013-06-16 21:11:01 -0400
committerWaylan Limberg <waylan@gmail.com>2013-06-16 21:11:01 -0400
commitc908b0463b17919c935944e49e282fec16ca5bf0 (patch)
treea61fc178bef21afcaeb52233785503382d6fcb40 /docs/extensions/code_hilite.txt
parentbf0791a5687a4c1248d69ce040620b3bb79a95ac (diff)
downloadmarkdown-c908b0463b17919c935944e49e282fec16ca5bf0.tar.gz
markdown-c908b0463b17919c935944e49e282fec16ca5bf0.tar.bz2
markdown-c908b0463b17919c935944e49e282fec16ca5bf0.zip
Improved codehilite docs. Document `css_class` setting.
Also cleaned up poor wording on other setting for codehilite. Thanks for the inital suggestion @davidcorne. Fixes #223.
Diffstat (limited to 'docs/extensions/code_hilite.txt')
-rw-r--r--docs/extensions/code_hilite.txt18
1 files changed, 13 insertions, 5 deletions
diff --git a/docs/extensions/code_hilite.txt b/docs/extensions/code_hilite.txt
index 116ad0f..ab09742 100644
--- a/docs/extensions/code_hilite.txt
+++ b/docs/extensions/code_hilite.txt
@@ -120,23 +120,31 @@ From the Python interpreter:
>>> html = markdown.markdown(text, extensions=['codehilite'])
-If you want to force every code block to have line numbers, even when using
+To force every code block to have line numbers, even when using
colons (`:::`) for language identification, set `linenums` to `True`.
>>> html = markdown.markdown(text,
... extensions=['codehilite(linenums=True)']
... )
-If you do **not** want any code block to have line numbers, even when using
-SheBangs (`#!`) for language identification, set `linenums` to `False`.
+To turn off all line numbers, even when using SheBangs (`#!`) for
+language identification, set `linenums` to `False`.
>>> html = markdown.markdown(text,
... extensions=['codehilite(linenums=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`.
+To prevent Pygments from guessing the language (only highlighting
+blocks when you explicitly request it) set the `guess_lang` setting to `False`.
>>> html = markdown.markdown(text,
... extensions=['codehilite(guess_lang=False)']
... )
+
+To assign a CSS class differant than the default ('codehilite') on the
+code's wrapping div, define a custom class with the `css_class` setting.
+
+ >>> html = markdown.markdown(text,
+ ... extensions=['codehilite(css_class=myclass)']
+ ... )
+