~sub linking regex should only match strings starting with alpha chars

This commit is contained in:
keyan 2022-03-10 12:59:24 -06:00
parent 38f7dba27f
commit 17ae89c085
1 changed files with 1 additions and 1 deletions

View File

@ -1,6 +1,6 @@
import findAndReplace from 'mdast-util-find-and-replace' import findAndReplace from 'mdast-util-find-and-replace'
const subGroup = '[\\w_]+' const subGroup = '[A-Za-z][\\w_]+'
const subRegex = new RegExp( const subRegex = new RegExp(
'~(' + subGroup + '(?:\\/' + subGroup + ')?)', '~(' + subGroup + '(?:\\/' + subGroup + ')?)',