Skip to content
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

Better handling of multi-line comments #626

Merged
merged 10 commits into from
Mar 9, 2022
Merged

Conversation

belav
Copy link
Owner

@belav belav commented Feb 28, 2022

closes #606

Src/CSharpier/DocPrinter/DocPrinter.cs Outdated Show resolved Hide resolved
Src/CSharpier/DocPrinter/DocPrinter.cs Outdated Show resolved Hide resolved
shocklateboy92
shocklateboy92 previously approved these changes Mar 6, 2022
@@ -21,6 +21,10 @@ public class ClassName
*/
public class ClassName2 { }

/* start
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So, with this case the start doesn't move.
Can you indent this line by another level?

I want to make sure that when it reduces indent of the first line, it doesn't try to make the second line go negative.

Copy link
Collaborator

@shocklateboy92 shocklateboy92 Mar 6, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay, I updated the test case myself. Looks like it caused a crash.

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice catch!

Src/CSharpier/DocPrinter/DocPrinter.cs Outdated Show resolved Hide resolved
@shocklateboy92 shocklateboy92 merged commit 7a846d4 into master Mar 9, 2022
@shocklateboy92 shocklateboy92 deleted the better-comments branch March 9, 2022 13:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Indent c style multiline comments correctly when they switch indentation.
2 participants