diff --git a/src/autolinker.ts b/src/autolinker.ts index 1e924a5a..5779ade5 100644 --- a/src/autolinker.ts +++ b/src/autolinker.ts @@ -145,11 +145,11 @@ function isCommonAbstractOp(op: string) { function lookAheadBeyond(key: string, entry: BiblioEntry) { if (isCommonAbstractOp(key)) { // must be followed by parentheses - return '\\b(?=\\()'; + return '(?=\\()'; } if (entry.type !== 'term' || /^\w/.test(key)) { - // must not be followed by `.word` or `%%` or `]]` - return '\\b(?!\\.\\w|%%|\\]\\])'; + // must not be followed by a letter, `.word`, `%%`, `]]` + return '(?!\\w|\\.\\w|%%|\\]\\])'; } return ''; } diff --git a/test/baselines/generated-reference/autolinking.html b/test/baselines/generated-reference/autolinking.html index 2705493b..f1f8fe75 100644 --- a/test/baselines/generated-reference/autolinking.html +++ b/test/baselines/generated-reference/autolinking.html @@ -17,6 +17,7 @@
extra spaces
Await
Variants
+Also, no autolinks in anchors: Lowercase.
Similarly, no autolinks for [Await].