Omit spaces after https in jsdoc comments#43800
Merged
Conversation
for tags with names. Fxes #42581
RyanCavanaugh
approved these changes
Apr 23, 2021
andrewbranch
approved these changes
Apr 23, 2021
Member
andrewbranch
left a comment
There was a problem hiding this comment.
This feels super kludgy to me, but I guess if it ends up mattering, you can come back to the parser change.
Member
Author
|
I agree, but switching the processing of comment whitespace from the parser to the language service is a big change -- I forgot to mention the margin/offside handling would have to move too -- and it would break anybody using the compiler API to get the comment text, since they're expecting processed, not raw, comment text. An API break like that would need to until Typescript 5.0 for sure. 🚎 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Omit spaces after https in jsdoc comments for tags with names.
Fixes #42581
I experimented with a more comprehensive change that made the parser retain all spaces and moved the responsibility to insert (or omit) the space to the language service. But it would have required another parser change to distinguish initial newlines, plus some too-clever code in the language service to handle initial newlines.
I noticed that #42581 doesn't ask for for whitespace-perfect comment preservation in the compiler API, just no spaces after
httpin the@seetag, so I decided to make an ad-hoc fix.