From 094e5a621b80b21bbc03937e2b40e1c32df93315 Mon Sep 17 00:00:00 2001 From: "(quasar) nebula" Date: Fri, 16 Apr 2021 13:54:55 -0300 Subject: match hash/replacerValue only without preceding WS --- upd8.js | 31 ++++++++++++++++++++++++------- 1 file changed, 24 insertions(+), 7 deletions(-) diff --git a/upd8.js b/upd8.js index 1781107..d2983e7 100755 --- a/upd8.js +++ b/upd8.js @@ -970,13 +970,30 @@ const replacerSpec = { const tagArgumentValue = '='; const tagLabel = '|'; - const R_tagBeginning = escapeRegex(tagBeginning); - const R_tagEnding = escapeRegex(tagEnding); - const R_tagReplacerValue = escapeRegex(tagReplacerValue); - const R_tagHash = escapeRegex(tagHash); - const R_tagArgument = escapeRegex(tagArgument); - const R_tagArgumentValue = escapeRegex(tagArgumentValue); - const R_tagLabel = escapeRegex(tagLabel); + const noPrecedingWhitespace = '(?