diff --git a/lib/lexer.js b/lib/lexer.js index 91b1928c..f55c7628 100644 --- a/lib/lexer.js +++ b/lib/lexer.js @@ -622,7 +622,7 @@ MULTI_DENT = /^(?:\n[^\n\S]*)+/; SIMPLESTR = /^'[^\\']*(?:\\.[^\\']*)*'/; JSTOKEN = /^`[^\\`]*(?:\\.[^\\`]*)*`/; - REGEX = /^\/(?!\s)[^[\/\n\\]*(?:(?:\\[\s\S]|\[[^\]\n\\]*(?:\\[\s\S][^\]\n\\]*)*])[^[\/\n\\]*)*\/[imgy]{0,4}(?![A-Za-z])/; + REGEX = /^\/(?!\s)[^[\/\n\\]*(?:(?:\\[\s\S]|\[[^\]\n\\]*(?:\\[\s\S][^\]\n\\]*)*])[^[\/\n\\]*)*\/[imgy]{0,4}(?![A-Za-z0-9])/; HEREGEX = /^\/{3}([\s\S]+?)\/{3}([imgy]{0,4})(?![A-Za-z])/; HEREGEX_OMIT = /\s+(?:#.*)?/g; MULTILINER = /\n/g; diff --git a/src/lexer.coffee b/src/lexer.coffee index 82c08716..eb6f035f 100644 --- a/src/lexer.coffee +++ b/src/lexer.coffee @@ -584,7 +584,7 @@ REGEX = /// ^ ] ) [^ [ / \n \\ ]* )* - / [imgy]{0,4} (?![A-Za-z]) + / [imgy]{0,4} (?![A-Za-z0-9]) /// HEREGEX = /^\/{3}([\s\S]+?)\/{3}([imgy]{0,4})(?![A-Za-z])/