Skip to content

Commit e8f585e

Browse files
committed
[markdown mode] Fix a potentially exponential-complexity regexp
1 parent c285a2c commit e8f585e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

mode/markdown/markdown.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ CodeMirror.defineMode("markdown", function(cmCfg, modeCfg) {
9090
, setextHeaderRE = /^ *(?:\={1,}|-{1,})\s*$/
9191
, textRE = /^[^#!\[\]*_\\<>` "'(~:]+/
9292
, fencedCodeRE = /^(~~~+|```+)[ \t]*([\w+#-]*)[^\n`]*$/
93-
, linkDefRE = /^\s*\[[^\]]+?\]:\s*\S+(\s*\S*\s*)?$/ // naive link-definition
93+
, linkDefRE = /^\s*\[[^\]]+?\]:.*$/ // naive link-definition
9494
, punctuation = /[!\"#$%&\'()*+,\-\.\/:;<=>?@\[\\\]^_`{|}~]/
9595
, expandedTab = " " // CommonMark specifies tab as 4 spaces
9696

0 commit comments

Comments
 (0)