From d9cb4155d0bf4440ecbdf1838654d288e4da7f6b Mon Sep 17 00:00:00 2001 From: Fabio Manganiello Date: Wed, 3 Aug 2022 23:42:49 +0200 Subject: [PATCH] The LaTexPostprocessor is no longer required --- madblog/latex.py | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/madblog/latex.py b/madblog/latex.py index fa2a2ef..dfc68db 100644 --- a/madblog/latex.py +++ b/madblog/latex.py @@ -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, )