Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Fix: improve comment indentation (fixes #514) #676

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

Merged
michalsnik merged 3 commits into master from issue514
Nov 25, 2018
Merged

Fix: improve comment indentation (fixes #514) #676

michalsnik merged 3 commits into master from issue514
Nov 25, 2018

Conversation

Copy link
Member

@mysticatea mysticatea commented Nov 24, 2018
edited
Loading

This PR fixes #514.

This PR modifies processNodeList() behavior.
It handles the tokens which are between nodes (e.g., comma tokens) as the same way as the nodes. After this PR, it handles the comments which are between nodes as well.

Then, validate() aligns comments that processNodeList() handled to the expected column. And it allows comments which are on the expected indent of the previous/next line in the same manner as before.

This fix will improve the comment indentation in templates, blocks, object literals, array literals, and class bodies.

Copy link
Member

@ota-meshi ota-meshi left a comment

Choose a reason for hiding this comment

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

LGTM!

@michalsnik michalsnik merged commit 925190f into master Nov 25, 2018
@michalsnik michalsnik deleted the issue514 branch November 25, 2018 23:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Reviewers

@ota-meshi ota-meshi ota-meshi approved these changes

+1 more reviewer

@michalsnik michalsnik michalsnik approved these changes

Reviewers whose approvals may not affect merge requirements
Assignees
No one assigned
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

html-indent: Wants to indent comments too deep after multiline tags

AltStyle によって変換されたページ (->オリジナル) /