From 6a241cdc7368bf4cc23ffbc9e83f0adeadc35a9b Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Fri, 11 Sep 2026 08:07:47 -0400 Subject: ocda: get image from is internal image markup correct circumstance where regex was incorrectly able to match image shaped words as well as identified and marked up image (internal markup). take all matches. (assisted by Claude-Code) --- org/default_regex.org | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'org/default_regex.org') diff --git a/org/default_regex.org b/org/default_regex.org index 430828b..d1fc76f 100644 --- a/org/default_regex.org +++ b/org/default_regex.org @@ -343,7 +343,9 @@ static smid_inline_link_endnote_url_helper = ctRegex!(`\{~\^\s+(?P[a-zA-Z0-9._-]+?\.(?:png|gif|jpg)),w\d+h\d+`, "mg"); +/+ smid_image for sisu markup source (.sst) images `{ name.png }image` +/ static smid_image = ctRegex!(`(?P
(?:^|[ ])[{┥](?:~\^\s+|\s*))(?P[a-zA-Z0-9._-]+?\.(?:png|gif|jpg))(?P(?:.*?)\s*[}┝](?:image|┤.*?├|(?:(?:https?|git):\/\/|¤?\.\.\/|¤?\.\/|¤|#)\S+?)(?=[;:!,?.]?([ )\]]|$)))`, "mg");
 static smid_image_generic                       = ctRegex!(`(?:^|[ ])[{┥](?:~\^\s+|\s*)\S+\.(?:png|gif|jpg).*?[}┝](?:image|┤.*?├|(?:(?:https?|git):\/\/|¤?\.\.\/|¤?\.\/|¤|#)\S+?)(?=[;:!,?.]?([ )\]]|$))`, "mg");
 static smid_image_with_dimensions               = ctRegex!(`(?P
(?:^|[ ])[{┥](?:~\^\s+|\s*))(?P[a-zA-Z0-9._-]+?\.(?:png|gif|jpg))\s+(?P\d+)x(?P\d+)\s*(?P(?:.*?)\s*[}┝](?:image|┤.*?├|(?:(?:https?|git):\/\/|¤?\.\.\/|¤?\.\/|¤|#)\S+?)(?=[;:!,?.]?([ )\]]|$)))`, "mg");
-- 
cgit v1.2.3