Closed kappanneo closed 2 years ago
Duplicate of microsoft/vscode#96867 (see that for why it was won't fixed)
Or actually, this is a slightly different case. Moving to correct repo
I am unsure exactly how to tackle this one but I think editing https://github.com/microsoft/vscode-markdown-tm-grammar/blob/master/markdown.tmLanguage.base.yaml#L424
(<?)((?<url>(?>[^\s()]+)|\(\g<url>*\))*)(>?) # The url
and changing it to:
(<?)(.*?)(>?) # The url
might fix the issue (and updating the corresponding captures)? If this is sufficient I can open an MR tackling this issue too.
FYI using https://github.com/textmate/markdown.tmbundle/blob/master/Syntaxes/Markdown.tmLanguage#L241 as inspiration
Edit: for documentation purposes the capture changes would change from:
'1': {name: punctuation.definition.string.begin.markdown}
'2': {name: string.other.link.title.markdown}
'4': {name: punctuation.definition.string.end.markdown}
'5': {name: punctuation.definition.metadata.markdown}
'6': {name: punctuation.definition.link.markdown}
'7': {name: markup.underline.link.markdown}
'9': {name: punctuation.definition.link.markdown}
'10': {name: string.other.link.description.title.markdown}
'11': {name: punctuation.definition.string.begin.markdown}
'12': {name: punctuation.definition.string.end.markdown}
'13': {name: string.other.link.description.title.markdown}
'14': {name: punctuation.definition.string.begin.markdown}
'15': {name: punctuation.definition.string.end.markdown}
'16': {name: punctuation.definition.metadata.markdown}
to
'1': {name: punctuation.definition.string.begin.markdown}
'2': {name: string.other.link.title.markdown}
'4': {name: punctuation.definition.string.end.markdown}
'5': {name: punctuation.definition.metadata.markdown}
'6': {name: punctuation.definition.link.markdown}
'7': {name: markup.underline.link.markdown}
'8': {name: punctuation.definition.link.markdown}
'9': {name: string.other.link.description.title.markdown}
'10': {name: punctuation.definition.string.begin.markdown}
'11': {name: punctuation.definition.string.end.markdown}
'12': {name: string.other.link.description.title.markdown}
'13': {name: punctuation.definition.string.begin.markdown}
'14': {name: punctuation.definition.string.end.markdown}
'15': {name: punctuation.definition.metadata.markdown}
Fixed by 2f9bda284d391f97982f7932ba49eb89b2ac83b1
Steps to Reproduce:
[text](<path with spaces>)
*;[text](path_without_spaces)
.(*angle brackets should allow for links with spaces)
Similar issue: https://github.com/Microsoft/vscode/issues/24763#issue-221783835 Except there the syntax was not complying with the CommonMark spec, while this should.
Again, links work in the PDF visualization, this is a text highlight issue, not a rendering one.
Does this issue occur when all extensions are disabled?: Yes