bugdown: Use our local copy of fenced_code

And wire it up to our local copy of codehilite.  This fixes highlighting in
fenced code blocks, e.g.

~~~~ .js
var x = function () {
    return "hi";
};
~~~~

(imported from commit 0efb0c9b98a3acdf55e18bb1918af7960f3425be)
This commit is contained in:
Keegan McAllister
2012-11-19 12:31:03 -05:00
parent 7d08c405f3
commit ba40bd390b
2 changed files with 5 additions and 4 deletions

View File

@@ -77,7 +77,7 @@ Dependencies:
import re
import markdown
from markdown.extensions.codehilite import CodeHilite, CodeHiliteExtension
from zephyr.lib.bugdown.codehilite import CodeHilite, CodeHiliteExtension
# Global vars
FENCED_BLOCK_RE = re.compile( \
@@ -130,7 +130,7 @@ class FencedBlockPreprocessor(markdown.preprocessors.Preprocessor):
# is enabled, so we call it to highlite the code
if self.codehilite_conf:
highliter = CodeHilite(m.group('code'),
linenos=self.codehilite_conf['force_linenos'][0],
force_linenos=self.codehilite_conf['force_linenos'][0],
guess_lang=self.codehilite_conf['guess_lang'][0],
css_class=self.codehilite_conf['css_class'][0],
style=self.codehilite_conf['pygments_style'][0],