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 all whitespace -- alternative approach #216

Closed
wants to merge 13 commits into from

Conversation

dpoetzsch
Copy link
Contributor

I implemented an alternative approach that avoids reparsing the output for newlines in the IndentWriter.

Basic idea was to use a specialized IndentWriter everywhere. This way, we can call the newline-specialized method writeLines in appendText.

Note however, that besides changing a lot of interfaces this implementation made the implementation of the LatchedWriter a lot more complicated because it also needs to be newline aware in its buffer.

@spullara
Copy link
Owner

I checked out this branch and ran the spec tests and it looks like whitespace differences still occur. Does the branch still require it to be enabled?

@dpoetzsch
Copy link
Contributor Author

This branch is not perfect yet. It shows how a tiny bit of performance could be achieved by adding a lot more complexity.

I just wanted to show how we might be able to avoid reparsing the output, but because of the new complexities with async writers I personally would prefer the solution of #215.

So I close this.

@dpoetzsch dpoetzsch closed this Oct 30, 2018
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.

2 participants