Change image inclusion syntax
John Smith

John Smith commited on 2022-16 21:44:08
Showing 1 changed files, with 1 additions and 1 deletions.


Image inclusion syntax was `IMG:path` but is now `IMG[path]`,
allowing for spaces in `path`.
... ...
@@ -41,7 +41,7 @@ end
41 41
 ]]
42 42
 local function imgify(text)
43 43
     -- adapted from https://stackoverflow.com/a/1579673
44
-    local PATTERN = "(.-)IMG:([^ ]+)"
44
+    local PATTERN = "(.-)IMG%[([^%]]+)%]"
45 45
     -- Cygwin/Mintty
46 46
     local DISPIMG = function(path)
47 47
         if path and #path > 0 then
48 48