aboutsummaryrefslogtreecommitdiffstats
path: root/docs/extensions/code_hilite.txt
diff options
context:
space:
mode:
authorWaylan Limberg <waylan.limberg@icloud.com>2015-02-05 22:23:52 -0500
committerWaylan Limberg <waylan.limberg@icloud.com>2015-02-05 22:23:52 -0500
commit9f6b45f8944a2d91041e941da609e5ac09373e22 (patch)
treeb61016122f7b8d35257b4619f5cb259c202c2498 /docs/extensions/code_hilite.txt
parent75855cdcca179f2a332bddfc4ea7c9730f701360 (diff)
downloadmarkdown-9f6b45f8944a2d91041e941da609e5ac09373e22.tar.gz
markdown-9f6b45f8944a2d91041e941da609e5ac09373e22.tar.bz2
markdown-9f6b45f8944a2d91041e941da609e5ac09373e22.zip
Added a 'use_pygments' config option to CodeHilite.
Fixes #386. I'm doing this against my better judgement. The only reason is that I'm using the HTML format suggested by the HTML5 Spec and will simply not consider any alternate output. If a JavaScript library requires something else, to bad. I don't care. That library should support the format suggested by the spec or I'm not interested in it. If you want something else then you can create your own extension which does whatever you want.
Diffstat (limited to 'docs/extensions/code_hilite.txt')
-rw-r--r--docs/extensions/code_hilite.txt11
1 files changed, 10 insertions, 1 deletions
diff --git a/docs/extensions/code_hilite.txt b/docs/extensions/code_hilite.txt
index c775df7..92f8c12 100644
--- a/docs/extensions/code_hilite.txt
+++ b/docs/extensions/code_hilite.txt
@@ -31,7 +31,7 @@ language. When that fails, the code block will display as un-highlighted code.
[documentation]: http://pygments.org/docs
!!! Note
- The css and/or javascript is not included as part of this extension
+ The css and/or JavaScript is not included as part of this extension
but must be provided by the end user. The Pygments project provides
default css styles which you may find to be a useful starting point.
@@ -165,3 +165,12 @@ The following options are provided to configure the output:
* **`noclasses`**:
Use inline styles instead of CSS classes. Defaults to `False`.
+
+* **`use_pygments`**:
+ Defaults to `True`. Set to `False` to disable the use of Pygments.
+ If a language is defined for a code block, it will be assigned to the
+ `<code>` tag as a class in the manner suggested by the [HTML5 spec][spec]
+ (alternate output will not be entertained) and might be used by a JavaScript
+ library in the browser to highlight the code block.
+
+[spec]: http://www.w3.org/TR/html5/text-level-semantics.html#the-code-element