From 17ae89c0852eb7417a45dfb143763223279e9b96 Mon Sep 17 00:00:00 2001 From: keyan Date: Thu, 10 Mar 2022 12:59:24 -0600 Subject: [PATCH] ~sub linking regex should only match strings starting with alpha chars --- lib/remark-sub.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/remark-sub.js b/lib/remark-sub.js index d3138a54..2e608664 100644 --- a/lib/remark-sub.js +++ b/lib/remark-sub.js @@ -1,6 +1,6 @@ import findAndReplace from 'mdast-util-find-and-replace' -const subGroup = '[\\w_]+' +const subGroup = '[A-Za-z][\\w_]+' const subRegex = new RegExp( '~(' + subGroup + '(?:\\/' + subGroup + ')?)',