The LaTexPostprocessor is no longer required
This commit is contained in:
parent
0f3a84cae8
commit
d9cb4155d0
1 changed files with 0 additions and 16 deletions
|
@ -225,28 +225,12 @@ class LaTeXPreprocessor(markdown.preprocessors.Preprocessor):
|
|||
return hashlib.sha1(tex.encode()).hexdigest()
|
||||
|
||||
|
||||
class LaTeXPostprocessor(markdown.postprocessors.Postprocessor):
|
||||
"""This post processor extension just allows us to further
|
||||
refine, if necessary, the document after it has been parsed."""
|
||||
|
||||
def run(self, lines):
|
||||
# Inline a style for default behavior
|
||||
return [img_css] + lines
|
||||
|
||||
|
||||
class MarkdownLatex(markdown.Extension):
|
||||
"""Wrapper for LaTeXPreprocessor"""
|
||||
|
||||
def extendMarkdown(self, md):
|
||||
# Our base LaTeX extension
|
||||
md.preprocessors.register(
|
||||
LaTeXPreprocessor(self),
|
||||
'latex',
|
||||
0,
|
||||
)
|
||||
|
||||
md.preprocessors.register(
|
||||
LaTeXPostprocessor(self),
|
||||
'latex',
|
||||
1,
|
||||
)
|
||||
|
|
Loading…
Reference in a new issue