Skip to content

Commit

Permalink
Fix extensions for recent python3-markdown and suppress warning
Browse files Browse the repository at this point in the history
Signed-off-by: Benjamin Somers <[email protected]>
  • Loading branch information
bensmrs committed May 24, 2024
1 parent 88b98a3 commit bddf3d0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions extensions/format_details.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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)
4 changes: 2 additions & 2 deletions extensions/include_toc.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

0 comments on commit bddf3d0

Please sign in to comment.