mirror of https://github.com/zulip/zulip.git
Simplify FencedBlockPreprocessor.format_fence().
(imported from commit 741f4f0640756d545019b6fe6850af3198b351ba)
This commit is contained in:
parent
c0f312ec29
commit
46838ec6d0
|
@ -140,10 +140,11 @@ class FencedBlockPreprocessor(markdown.preprocessors.Preprocessor):
|
||||||
langclass = ''
|
langclass = ''
|
||||||
if lang:
|
if lang:
|
||||||
langclass = LANG_TAG % (lang,)
|
langclass = LANG_TAG % (lang,)
|
||||||
|
|
||||||
if lang in ('quote', 'quoted'):
|
if lang in ('quote', 'quoted'):
|
||||||
replacement = self.format_quote(text)
|
replacement = self.format_quote(text)
|
||||||
return replacement
|
return replacement
|
||||||
|
else:
|
||||||
code = self.format_code(langclass, lang, text)
|
code = self.format_code(langclass, lang, text)
|
||||||
placeholder = self.markdown.htmlStash.store(code, safe=True)
|
placeholder = self.markdown.htmlStash.store(code, safe=True)
|
||||||
return placeholder
|
return placeholder
|
||||||
|
|
Loading…
Reference in New Issue