diff --git a/plugins/smolnet.py b/plugins/smolnet.py index c571521..9a7b513 100644 --- a/plugins/smolnet.py +++ b/plugins/smolnet.py @@ -123,7 +123,9 @@ FOOTNOTE_REF = re.compile(r"\[\^([^\]]+)\]") LINKREF_DEF = re.compile(r"^\[(\d+)\]:", re.MULTILINE) # The opening line of a GitHub/Obsidian-style callout, "> [!kind] title". -CALLOUT = re.compile(r"^([ ]{0,3}>[ ]?)\[!(\w+)\][ \t]*(.*)$", re.MULTILINE) +# The trailing newline is part of the match, so a marker with no label can be +# dropped whole instead of leaving the quote to open on a blank line. +CALLOUT = re.compile(r"^([ ]{0,3}>[ ]?)\[!(\w+)\][ \t]*(.*)\n?", re.MULTILINE) def rot13(text): @@ -334,7 +336,7 @@ def rewrite_callouts(text, kinds): The HTML build renders these as boxes (an