diff --git a/src/rules.ts b/src/rules.ts index d74f2e23..81db2dc3 100644 --- a/src/rules.ts +++ b/src/rules.ts @@ -586,9 +586,12 @@ const inlineGfm: Record = { .getRegex(), _backpedal: /(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/, del: /^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/, - text: edit(/^(?:[^a-zA-Z0-9](?=emailProtocol)|(`+|~+|[^`~])(?:(?=[`~])|(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\xwww.example.com

+ +

a.www.example.com

+ +

<www.example.com>

+ +

visit www.example.com

+ +

www.example.com

+ +

(www.example.com)

+ +

www.example.com

diff --git a/test/specs/new/autolink_www_word_start.md b/test/specs/new/autolink_www_word_start.md new file mode 100644 index 00000000..87b322b7 --- /dev/null +++ b/test/specs/new/autolink_www_word_start.md @@ -0,0 +1,13 @@ +xwww.example.com + +a.www.example.com + + + +visit www.example.com + +*www.example.com* + +(www.example.com) + +_www.example.com_