From cf29dd7174c33f96d39b1ab448be3dcab1239417 Mon Sep 17 00:00:00 2001 From: randogoth Date: Thu, 22 Oct 2026 11:29:03 +0300 Subject: [PATCH] fix: smolnet drops a callout marker that has no label A `> [!kind]` with no title and an empty default label now loses the marker line entirely, leaving a plain blockquote, instead of printing an empty bold label. Co-Authored-By: Claude Opus 5.5 --- plugins/smolnet.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) 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