fix: highlight code as last step

This commit is contained in:
Michal Szczepanski 2022-11-27 21:28:37 +01:00
parent 9c472c0c10
commit 3c5f841e7f

@ -38,7 +38,6 @@ class HighlightPreprocessor(Preprocessor):
start = line.find('%}')+2
end = line.find(self.end)
code = line[start:end]
# print('code hightlight inline : {}'.format(code))
if have_code == 1 and not skip:
code += line+'\n'
if have_code == 2:
@ -59,7 +58,7 @@ class HighlightPreprocessor(Preprocessor):
class HighlightExtension(Extension):
def extendMarkdown(self, md):
md.preprocessors.register(HighlightPreprocessor(md), 'highlight', 0)
md.preprocessors.register(HighlightPreprocessor(md), 'highlight', 999999)
def generate(content):