]> git.plutz.net Git - shellwiki/commitdiff
Squashed 'cgilite/' changes from 7f444e3..67422ab
authorPaul Hänsch <paul@plutz.net>
Tue, 27 Aug 2024 04:54:49 +0000 (06:54 +0200)
committerPaul Hänsch <paul@plutz.net>
Tue, 27 Aug 2024 04:54:49 +0000 (06:54 +0200)
67422ab fix faulty call of HTML function

git-subtree-dir: cgilite
git-subtree-split: 67422abc6b7b74515f2f093df234b0436a93f251

markdown.awk

index 34879d25c22ba3498633c366374a9feeac6be943..cb2a8f64b5e5a5330e5ff6513ab9d1a96ee59428 100755 (executable)
@@ -234,7 +234,7 @@ function inline( line, LOCAL, len, text, code, href, guard ) {
     gsub(/^[\t ]+$/, "", text); gsub(/\\/, "", href);
     gsub(/\\/, "", title); gsub(/[\n\t]+/, " ", title);
 
-    return "<img src=\"" HTML(href, 1) "\" alt=\"" HTML(text?text:title?title:href) "\"" \
+    return "<img src=\"" HTML(href) "\" alt=\"" HTML(text?text:title?title:href) "\"" \
            (title?" title=\"" HTML(title) "\"":"") (attrib?" class=\"" HTML(attrib) "\"":"") \
            ">" inline( substr( line, len + 1) );
 
@@ -245,10 +245,10 @@ function inline( line, LOCAL, len, text, code, href, guard ) {
       id = gensub(/^!\[([^\n]*)\] ?\[([^\n]*)\].*/, "\\2", 1, substr(line, 1, len) );
     if ( ! id ) id = text;
     if ( rl_href[id] && rl_title[id] ) {
-      return "<img src=\"" HTML(rl_href[id], 1) "\" alt=\"" HTML(text) "\" title=\"" HTML(rl_title[id]) "\">" \
+      return "<img src=\"" HTML(rl_href[id]) "\" alt=\"" HTML(text) "\" title=\"" HTML(rl_title[id]) "\">" \
              inline( substr( line, len + 1) );
     } else if ( rl_href[id] ) {
-      return "<img src=\"" HTML(rl_href[id], 1) "\" alt=\"" HTML(text) "\">" \
+      return "<img src=\"" HTML(rl_href[id]) "\" alt=\"" HTML(text) "\">" \
              inline( substr( line, len + 1) );
     } else {
       return "" HTML(substr(line, 1, len)) inline( substr(line, len + 1) );
@@ -663,8 +663,8 @@ function _block( block, LOCAL, st, len, text, title, attrib, href, guard, code,
 
     gsub(/^[\t ]+$/, "", text); gsub(/\\/, "", href);
 
-    return "<figure data-src=\"" HTML(href, 1) "\"" (attrib?" class=\"" HTML(attrib) "\"":"") ">" \
-           "<img src=\"" HTML(href, 1) "\" alt=\"" HTML(text?text:title?title:href) "\"" \
+    return "<figure data-src=\"" HTML(href) "\"" (attrib?" class=\"" HTML(attrib) "\"":"") ">" \
+           "<img src=\"" HTML(href) "\" alt=\"" HTML(text?text:title?title:href) "\"" \
            (attrib?" class=\"" HTML(attrib) "\"":"") ">" \
            (title?"<figcaption>" inline(title) "</figcaption>":"") \
            "</figure>\n\n" \
@@ -677,14 +677,14 @@ function _block( block, LOCAL, st, len, text, title, attrib, href, guard, code,
       id = gensub(/^!\[([^\n]*)\] ?\[([^\n]*)\](\n.*)?$/, "\\2", 1, block);
     if ( ! id ) id = text;
     if ( rl_href[id] && rl_title[id] ) {
-      return "<figure data-src=\"" HTML(rl_href[id], 1) "\">" \
-               "<img src=\"" HTML(rl_href[id], 1) "\" alt=\"" HTML(text) "\">" \
+      return "<figure data-src=\"" HTML(rl_href[id]) "\">" \
+               "<img src=\"" HTML(rl_href[id]) "\" alt=\"" HTML(text) "\">" \
                "<figcaption>" inline(rl_title[id]) "</figcaption>" \
              "</figure>\n\n" \
              _block( substr( block, len + 1) );
     } else if ( rl_href[id] ) {
-      return "<figure data-src=\"" HTML(rl_href[id], 1) "\">" \
-               "<img src=\"" HTML(rl_href[id], 1) "\" alt=\"" HTML(text) "\">" \
+      return "<figure data-src=\"" HTML(rl_href[id]) "\">" \
+               "<img src=\"" HTML(rl_href[id]) "\" alt=\"" HTML(text) "\">" \
              "</figure>\n\n" \
              _block( substr( block, len + 1) );
     } else {