diff --git a/extensions/format_details.py b/extensions/format_details.py index e1a81b09..5fe682e3 100644 --- a/extensions/format_details.py +++ b/extensions/format_details.py @@ -22,7 +22,7 @@ def run(self, lines): # it in the required format. details = 1 - match = re.search('\[details=(.+)\]', line) + match = re.search(r'\[details=(.+)\]', line) if match: new_lines.append("??? details "+match.group(1)+"\n") else: @@ -52,5 +52,5 @@ def run(self, lines): class FormatDetailsExtension (Extension): - def extendMarkdown(self, md, md_globals): - md.preprocessors.add('formatdetails', FixFormatting(md), '_begin') + def extendMarkdown(self, md): + md.preprocessors.register(FixFormatting(md), 'formatdetails', 9999) diff --git a/extensions/include_toc.py b/extensions/include_toc.py index 7d2e3f76..dfa937a1 100644 --- a/extensions/include_toc.py +++ b/extensions/include_toc.py @@ -38,5 +38,5 @@ def run(self, lines): class IncludeToCExtension (Extension): - def extendMarkdown(self, md, md_globals): - md.preprocessors.add('includetoc', InsertToCStuff(md), '_begin') + def extendMarkdown(self, md): + md.preprocessors.register(InsertToCStuff(md), 'includetoc', 9999)