diff --git a/python/zensical/collectors/exclusions.py b/python/zensical/collectors/exclusions.py index bf8cc7a..bcfb45f 100644 --- a/python/zensical/collectors/exclusions.py +++ b/python/zensical/collectors/exclusions.py @@ -68,6 +68,50 @@ _RE = re.compile( ^[ \t]*$ # Closing tag ) | + # Block math: + # + # $$ + # ... + # $$ + # + (?P + ^[^\S\n]*\$\$[^\S\n]*\n # Opening $$ on its own line + .*? # Math content + ^[^\S\n]*\$\$[^\S\n]*$ # Closing $$ on its own line + ) + | + # Block math (alternate): + # + # \[ + # ... + # \] + # + (?P + ^[^\S\n]*\\\[[^\S\n]*\n # Opening \[ on its own line + .*? # Math content + ^[^\S\n]*\\\][^\S\n]*$ # Closing \] on its own line + ) + | + # Inline math: + # + # $f(x)$ + # + (?P + (? + \\\( # Opening \( + (?-s:.*?) # Math content (same line only) + \\\) # Closing \) + ) + | # Inline code blocks (?P (?P`+) # Opening backticks