-
Notifications
You must be signed in to change notification settings - Fork 12.8k
fix(53576): Don't remove indentations from JSDoc tag documentation #53631
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
@microsoft-github-policy-service agree |
Some reviewer notes:
/**
* @param foo docs
* none of these lines will be indented
*/ but this won't: /**
* @param foo docs
* This indentation
* will be lost
* because it appears
* before the `@param` tag
*/
|
I haven't reviewed the code properly yet, but
|
Sure! This should do it. |
@typescript-bot perf test this |
Heya @sandersn, I've started to run the perf test suite on this PR at b4dd315. You can monitor the build here. Update: The results are in! |
@sandersn Here they are:
CompilerComparison Report - main..53631
System
Hosts
Scenarios
TSServerComparison Report - main..53631
System
Hosts
Scenarios
StartupComparison Report - main..53631
System
Hosts
Scenarios
Developer Information: |
@sandersn Are the perf results ok? An increase of 1% in some of these sounds like a lot. Is there anything I should change? |
// | spanning on two lines and aligned perfectly | ||
// | spanning on two lines and aligned perfectly | ||
// | @param b this is info about b | ||
// | spanning on two lines and aligned perfectly | ||
// | spanning one more line alined perfectly | ||
// | spanning another line with more margin | ||
// | spanning on two lines and aligned perfectly | ||
// | spanning one more line alined perfectly | ||
// | spanning another line with more margin | ||
// | @param c this is info about b | ||
// | not aligned text about parameter will eat only one space | ||
// | not aligned text about parameter will eat only one space |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This to me looks very unexpected; I would expect that common leading spaces are chopped off, such that this does not change. This contrasts with the other jsdoc server tests where this seems to work.
Having ported the indentation code to Go recently, I'd rather see a change to drop the offside-style indentation rules entirely. With that, I think this PR could remove quite a bit of code, since the bug fix would effectively be the default. |
Fixes #53576
This change makes documentation indentation for JSDoc tags behave the same as documentation without tags. I.e: