Change:
Vscodes ctrl+click links now consumes , causing it to open an invalid url (unless the link starts right after a ) Notice how the at the end of the first link is underlined clicking it takes me to , which is invalid !
The links are generated by the textual link detector What's interesting here is: If the string is just a link the link does not include the quote. If it has content after the starting quote, it includes the final quote. !
I am experiencing the same thing, with single quotes in the terminal. Here are some tests/replication steps you can run in a bash terminal: It's not clear to me if this an error in vscode or .
The current implementation of the link parser considers or to be stop characters only when the link began with such a quote character. Making quotes always be stop characters in link parsing would end up re-opening where the request was that: be identified as a link
Hmm.. very tricky indeed that link is surrounded by backticks so you could prioritize finding surrounding quotes/backticks over stopping on a quote that way if there is no starting quote/backtick, it can then stop on any quote like before how often does come up? and is that link even valid to click tho? opening it in chrome just takes me google search my problem affects almost every single file in almost every extension inside the vscode repo ! this is taken directly from vscodes C extension clicking the top link gives: !
I'm trying to make the change discussed here but my local change ends up breaking another test case, the one for In other words, I can't come up with a rule to distinguish: In both cases, the syntax agnostic link detector encounters quotes ( or ) and in one case it is desirable that the quote continue the link, while in the other case it is desirable that the quote ends the link. For a parser that is programming language agnostic, these two cases look pretty much identical. So there doesn't seem to me to be a way to have both work correctly. Looking at our own repository, it looks like it is more likely to run into the second case where a quote is a link terminator.

Discussion:
case CharCode.CloseCurlyBrace: chClass = (hasOpenCurlyBracket ? CharacterClass.None : CharacterClass.ForceTermination); break; <del> /* The following three rules make it that ' or " or ` are allowed inside links if the link didn't begin with them */ </del> <ins> // The following three rules make it that ' or " or ` are allowed inside links // only if the link is wrapped by some other quote character </ins> case CharCode.SingleQuote: <del> chClass = (linkBeginChCode === CharCode.SingleQuote ? CharacterClass.ForceTermination : CharacterClass.None); break; </del> case CharCode.DoubleQuote: <del> chClass = (linkBeginChCode === CharCode.DoubleQuote ? CharacterClass.ForceTermination : CharacterClass.None); break; </del> case CharCode.BackTick: <del> chClass = (linkBeginChCode === CharCode.BackTick ? CharacterClass.ForceTermination : CharacterClass.None); </del> <ins> if (linkBeginChCode === chCode) { chClass = CharacterClass.ForceTermination; } else if (linkBeginChCode === CharCode.SingleQuote || linkBeginChCode === CharCode.DoubleQuote || linkBeginChCode === CharCode.BackTick) { chClass = CharacterClass.None; } else { chClass = CharacterClass.ForceTermination; } </ins> break; case CharCode.Asterisk: // `*` terminates a link if the link began with `*`

); }); <del> test('issue #151631: Link parsing stoped where comments include a single quote ', () => { assertLink( `aa https://regexper.com/#%2F''%2F aa`, `   https://regexper.com/#%2F''%2F   `, </del> <ins> // Removed because of #156875 // test('issue #151631: Link parsing stoped where comments include a single quote ', () => { // 	assertLink( // 		`aa https://regexper.com/#%2F''%2F aa`, // 		`   https://regexper.com/#%2F''%2F   `, // 	); // }); test('issue #156875: Links include quotes ', () => { assertLink( `"This file has been converted from https://github.com/jeff-hykin/better-c-syntax/blob/master/autogenerated/c.tmLanguage.json",`, `                                   https://github.com/jeff-hykin/better-c-syntax/blob/master/autogenerated/c.tmLanguage.json  `, </ins> ); }); });