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

Fix magically added slashes #647

Merged
merged 2 commits into from
Apr 19, 2019

Conversation

w5l
Copy link
Collaborator

@w5l w5l commented Apr 18, 2019

Once again, I cannot seem to fix an issue without reorganizing half the formatting code.

Up to now, a call to NewLine() created a newline and immediately wrote a comment prefix (eg ///). Then indenting was added manually from the individual line formatter.
I've changed this to add the prefix and optional indenting when the first word is added to the output, which makes for a more logical and less error prone process. It's still messy, but slightly less so 😉

At least this fixes #646.

Copy link
Owner

@codecadwallader codecadwallader left a comment

Choose a reason for hiding this comment

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

Awesome, thanks @willemduncan ! That's probably a great way to start introducing some .editorconfig awareness into the project too. 😃

@@ -0,0 +1,8 @@
; Top-most EditorConfig file
root = true
Copy link
Owner

Choose a reason for hiding this comment

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

Cool!

@codecadwallader codecadwallader merged commit bc9c7c7 into codecadwallader:master Apr 19, 2019
@codecadwallader codecadwallader added this to the v11.1 milestone Apr 19, 2019
@w5l w5l deleted the fixMagicallyAddedSlashes branch April 23, 2019 07:13
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.

Comment formatting incrementally adds slashes
2 participants