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

Introduce a newline only mode #23

Merged
merged 2 commits into from
Feb 13, 2025
Merged

Conversation

kybishop
Copy link
Contributor

@kybishop kybishop commented Feb 12, 2025

Preserving the original newlines turns out to be very non-trivial... though perhaps there is some secret sauce with walking ASTs that I'm unaware of that enables one to preserve the original formatting.

Until/unless that is discovered, this is a middle ground that lets you do all the newline fixes in one fell swoop before enabling Quokka wholesale.

For anyone wondering or interested in taking a look, here is the line responsible for shrinking down newlines (it took me far too long to figure out it wasn't a standard AST transformation elsewhere in the repo 🤦)

@kybishop kybishop force-pushed the do-not-reformat-vertical-space branch from 0da67d4 to 418fd7b Compare February 12, 2025 17:01
@kybishop kybishop marked this pull request as ready for review February 12, 2025 17:01
Copy link
Collaborator

@emkguts emkguts left a comment

Choose a reason for hiding this comment

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

Can you update the docs to explain how this opt works? Great addition, thanks for taking this on!

@kybishop
Copy link
Contributor Author

@emkguts done! 8fa7dd1

@@ -4,15 +4,16 @@

# Quokka

<img src="docs/assets/quokka.png" alt="A happy quokka with style" width="300"/>
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Lots of auto-formatting from prettier in here. I think worth keeping the changes.

@emkguts emkguts merged commit f1e7e08 into main Feb 13, 2025
6 checks passed
@emkguts emkguts deleted the do-not-reformat-vertical-space branch February 13, 2025 23:52
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