-
Notifications
You must be signed in to change notification settings - Fork 57
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
Support de-indenting/indenting block comments according to their leading line indentation #678
Comments
I guess one work-around that could be done in Deno itself is to split into lines, trim them and then join. That will however make some comments formatting off. I'm gonna apply it for now to get rid of panics, but I think it'd be better to fix it in dprint itself. |
dprint-plugin-typescript doesn't modify block comments. This is an issue somewhere else. |
After discussion, we're going to improve dprint-plugin-typescript to handle de-indenting/indenting these kind of block comments. Initially we were thinking markup_fmt should de-indent itself, but it wouldn't be able to handle scenarios like:
|
A few more examples of inputs that cause unstable format:
|
@dsherret FYI I opened an issue with I'm beginning to think that |
Closing as this can now be solved with #689. |
Describe the bug
dprint-plugin-typescript version: 0.93.0
Input Code
Expected Output
Actual Output
Then after using the "Actual output" as input to check for format stability we get:
and then again:
And it continues...
This is the root cause for denoland/deno#26560
The text was updated successfully, but these errors were encountered: