Skip to content

Commit

Permalink
Prioritizing macros above other inline patterns (#223)
Browse files Browse the repository at this point in the history
Previously, including an inline pattern within a macro breaks the whole process; this is untenable, since it means that escaping a character in an argument renders it wholly unworkable.
  • Loading branch information
benbdeitch authored Aug 7, 2024
1 parent 29da8b5 commit cb117b0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion infogami/utils/macro.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ def replace_macros(html, macros):

class MacroExtension(markdown.Extension):
def extendMarkdown(self, md, md_globals):
md.inlinePatterns.append(MacroPattern(md))
md.inlinePatterns.insert(0, MacroPattern(md))
md.macro_count = 0
md.macros = {}

Expand Down

0 comments on commit cb117b0

Please sign in to comment.