Extract vars in FencedBlockPreprocessor.process_fence().

(imported from commit 092a8e5f7479f1d918219cae058b6a867743c7f9)
This commit is contained in:
Steve Howell 2013-11-20 13:53:03 -05:00
parent b3344c2f49
commit 2955cac47e
1 changed files with 3 additions and 1 deletions

View File

@ -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. """