diff --git a/lib/replace.js b/lib/replace.js
index <HASH>..<HASH> 100644
--- a/lib/replace.js
+++ b/lib/replace.js
@@ -77,7 +77,7 @@ module.exports = function create_rule(md, emojies, shortcuts, scanRE, replaceRE)
           if (token.info === 'auto') { autolinkLevel -= token.nesting; }
         }
 
-        if (token.type === 'text' && scanRE.test(token.content) && autolinkLevel === 0) {
+        if (token.type === 'text' && autolinkLevel === 0 && scanRE.test(token.content)) {
           // replace current node
           blockTokens[j].children = tokens = arrayReplaceAt(
             tokens, i, splitTextToken(token.content, token.level, state.Token)
only run regex if autolinkLevel is 0

very minor perf improvement