Skip to content

Commit

Permalink
fix old api usage
Browse files Browse the repository at this point in the history
  • Loading branch information
btbytes committed Apr 6, 2023
1 parent 47e13cb commit 2b2c145
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
.idea/
__pycache__/
build/
dist/
mdx_bib.egg-info/
8 changes: 4 additions & 4 deletions mdx_bib.py
Original file line number Diff line number Diff line change
Expand Up @@ -195,11 +195,11 @@ def extendMarkdown(self, md):
self.parser = md.parser
self.md = md

md.preprocessors.add("mdx_bib", CitationsPreprocessor(self.bib), "<reference")
md.inlinePatterns.add(
"mdx_bib", CitationsPattern(CITATION_RE, self.bib), "<reference"
md.preprocessors.register(CitationsPreprocessor(self.bib), "mdx_bib", 10)
md.inlinePatterns.register(
CitationsPattern(CITATION_RE, self.bib), "mdx_bib", 20
)
md.treeprocessors.add("mdx_bib", CitationsTreeprocessor(self.bib), "_begin")
md.treeprocessors.register(CitationsTreeprocessor(self.bib), "mdx_bib", 30)


def makeExtension(*args, **kwargs):
Expand Down

0 comments on commit 2b2c145

Please sign in to comment.