Skip to content

Commit

Permalink
Update md.py; add link to Pandoc and change All processor names
Browse files Browse the repository at this point in the history
  • Loading branch information
johannesdewit authored Aug 5, 2024
1 parent 7b7e645 commit ecebb47
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion heidegger_index/md.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ def convert_md(content):


RE_LEMMA_LINK = r"\[\[([^\]\n]+)\]\]" # e.g. [[Aristoteles]]
# For citations were adhering to Pandoc's syntax.
# See https://pandoc.org/chunkedhtml-demo/8.20-citation-syntax.html
RE_WORK_CIT = r"\[@([^\]\n]+?)\]" # e.g. [@GA-62, p. 4]
RE_IN_TEXT_WORK_CIT = r"(?<!\[)@(\w[^\s,{}]*\w+)|@{([^\n{}]+?)}" # e.g. @GA-29/30 and @{GA 29/30}

Expand Down Expand Up @@ -132,6 +134,6 @@ def extendMarkdown(self, md):
WorkCitationInlineProcessor(RE_WORK_CIT, md), "work_cit", 41
)
md.inlinePatterns.register(
WorkLinkInTextInlineProcessor(RE_WORK_LINK_IN_TEXT, md), "work_link", 42
InTextWorkCitInlineProcessor(RE_IN_TEXT_WORK_CIT, md), "work_link", 42
)
md.parser.blockprocessors["quote"] = NonLazyBlockQuoteBlockProcessor(md.parser)

0 comments on commit ecebb47

Please sign in to comment.