From 0f5721ccae35840e0ceed0be4c6e881c3a9911c4 Mon Sep 17 00:00:00 2001 From: "(quasar) nebula" Date: Sat, 6 Feb 2021 14:20:24 -0400 Subject: keep processed 's in

--- upd8.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/upd8.js b/upd8.js index 26416b7..ba002d8 100755 --- a/upd8.js +++ b/upd8.js @@ -472,6 +472,7 @@ function transformMultiline(text, treatAsDocument=false) { let inBlockquote = false; for (let line of text.split(/\r|\n|\r\n/)) { + const imageLine = line.startsWith('/g, (match, attributes) => img({ lazy: true, link: true, @@ -545,7 +546,7 @@ function transformMultiline(text, treatAsDocument=false) { // certain inline element tags should still be postioned within a // paragraph; other elements (e.g. headings) should be added as-is const elementMatch = line.match(/^<(.*?)[ >]/); - if (elementMatch && !['a', 'abbr', 'b', 'bdo', 'br', 'cite', 'code', 'data', 'datalist', 'del', 'dfn', 'em', 'i', 'img', 'ins', 'kbd', 'mark', 'output', 'picture', 'q', 'ruby', 'samp', 'small', 'span', 'strong', 'sub', 'sup', 'svg', 'time', 'var', 'wbr'].includes(elementMatch[1])) { + if (elementMatch && !imageLine && !['a', 'abbr', 'b', 'bdo', 'br', 'cite', 'code', 'data', 'datalist', 'del', 'dfn', 'em', 'i', 'img', 'ins', 'kbd', 'mark', 'output', 'picture', 'q', 'ruby', 'samp', 'small', 'span', 'strong', 'sub', 'sup', 'svg', 'time', 'var', 'wbr'].includes(elementMatch[1])) { lineTag = ''; } } -- cgit 1.3.0-6-gf8a5