Compare commits
No commits in common. "53bd4b3d6941a56c2c5667bebcd0806afe575956" and "0f3a84cae8d58e74713cc12b55b828d6725f79e1" have entirely different histories.
53bd4b3d69
...
0f3a84cae8
4 changed files with 19 additions and 3 deletions
|
@ -1 +1 @@
|
||||||
__version__ = '0.2.8'
|
__version__ = '0.2.7'
|
||||||
|
|
|
@ -225,12 +225,28 @@ class LaTeXPreprocessor(markdown.preprocessors.Preprocessor):
|
||||||
return hashlib.sha1(tex.encode()).hexdigest()
|
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):
|
class MarkdownLatex(markdown.Extension):
|
||||||
"""Wrapper for LaTeXPreprocessor"""
|
"""Wrapper for LaTeXPreprocessor"""
|
||||||
|
|
||||||
def extendMarkdown(self, md):
|
def extendMarkdown(self, md):
|
||||||
|
# Our base LaTeX extension
|
||||||
md.preprocessors.register(
|
md.preprocessors.register(
|
||||||
LaTeXPreprocessor(self),
|
LaTeXPreprocessor(self),
|
||||||
'latex',
|
'latex',
|
||||||
|
0,
|
||||||
|
)
|
||||||
|
|
||||||
|
md.preprocessors.register(
|
||||||
|
LaTeXPostprocessor(self),
|
||||||
|
'latex',
|
||||||
1,
|
1,
|
||||||
)
|
)
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
[bumpversion]
|
[bumpversion]
|
||||||
current_version = 0.2.8
|
current_version = 0.2.7
|
||||||
commit = True
|
commit = True
|
||||||
tag = True
|
tag = True
|
||||||
|
|
||||||
|
|
2
setup.py
2
setup.py
|
@ -11,7 +11,7 @@ def readfile(file):
|
||||||
|
|
||||||
setup(
|
setup(
|
||||||
name='madblog',
|
name='madblog',
|
||||||
version='0.2.8',
|
version='0.2.7',
|
||||||
author='Fabio Manganiello',
|
author='Fabio Manganiello',
|
||||||
author_email='info@fabiomanganiello.com',
|
author_email='info@fabiomanganiello.com',
|
||||||
description='A minimal platform for Markdown-based blogs',
|
description='A minimal platform for Markdown-based blogs',
|
||||||
|
|
Loading…
Reference in a new issue