diff --git a/python/zensical/collectors/exclusions.py b/python/zensical/collectors/exclusions.py index bcfb45f..c99240e 100644 --- a/python/zensical/collectors/exclusions.py +++ b/python/zensical/collectors/exclusions.py @@ -48,8 +48,8 @@ _RE = re.compile( (?P`{3,}|~{3,}) # Capture fence character and length [^\n]*\n # Optional info string .*? # Block content - ^(?P=indent)(?P=fence) # Closing fence must match indent + fence - [^\n]*$ # Optional trailing content + ^[ \t]*(?P=fence)[`~]* # Closing fence: same type, at least as long + [^\n]*(\n|$) # Optional trailing content ) | # HTML comments (block and inline)