mirror of
https://github.com/zulip/zulip.git
synced 2025-11-09 16:37:23 +00:00
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:
@@ -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],
|
||||
|
||||
Reference in New Issue
Block a user