fix: fix non-breaking space in link url (#3667)
This commit is contained in:
parent
c37336c241
commit
e071e25d13
@ -338,9 +338,9 @@ const tag = edit(
|
|||||||
|
|
||||||
const _inlineLabel = /(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/;
|
const _inlineLabel = /(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/;
|
||||||
|
|
||||||
const link = edit(/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/)
|
const link = edit(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/)
|
||||||
.replace('label', _inlineLabel)
|
.replace('label', _inlineLabel)
|
||||||
.replace('href', /<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/)
|
.replace('href', /<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/)
|
||||||
.replace('title', /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/)
|
.replace('title', /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/)
|
||||||
.getRegex();
|
.getRegex();
|
||||||
|
|
||||||
|
@ -4056,8 +4056,7 @@
|
|||||||
"example": 507,
|
"example": 507,
|
||||||
"start_line": 7776,
|
"start_line": 7776,
|
||||||
"end_line": 7780,
|
"end_line": 7780,
|
||||||
"section": "Links",
|
"section": "Links"
|
||||||
"shouldFail": true
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"markdown": "[link](/url \"title \"and\" title\")\n",
|
"markdown": "[link](/url \"title \"and\" title\")\n",
|
||||||
|
@ -4056,8 +4056,7 @@
|
|||||||
"example": 507,
|
"example": 507,
|
||||||
"start_line": 7776,
|
"start_line": 7776,
|
||||||
"end_line": 7780,
|
"end_line": 7780,
|
||||||
"section": "Links",
|
"section": "Links"
|
||||||
"shouldFail": true
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"markdown": "[link](/url \"title \"and\" title\")\n",
|
"markdown": "[link](/url \"title \"and\" title\")\n",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user