mirror of https://github.com/zulip/zulip.git
Extract vars in FencedBlockPreprocessor.process_fence().
(imported from commit 092a8e5f7479f1d918219cae058b6a867743c7f9)
This commit is contained in:
parent
b3344c2f49
commit
2955cac47e
|
@ -153,7 +153,9 @@ class FencedBlockPreprocessor(markdown.preprocessors.Preprocessor):
|
|||
lang = m.group('lang')
|
||||
code = m.group('code')
|
||||
fence_text = self.format_fence(lang, code)
|
||||
return '%s\n%s\n%s'% (text[:m.start()], fence_text, text[m.end():])
|
||||
before_text = text[:m.start()]
|
||||
end_text = text[m.end():]
|
||||
return '%s\n%s\n%s'% (before_text, fence_text, end_text)
|
||||
|
||||
def run(self, lines):
|
||||
""" Match and store Fenced Code Blocks in the HtmlStash. """
|
||||
|
|
Loading…
Reference in New Issue