-
Notifications
You must be signed in to change notification settings - Fork 24
feat: not always trim trailing whitespaces #439
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
Draft
QuadnucYard
wants to merge
5
commits into
typstyle-rs:master
Choose a base branch
from
QuadnucYard:no-trim-line
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
QuadnucYard
commented
Oct 11, 2025
Comment on lines
+19
to
+21
/ | ||
: | ||
/ | ||
/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
needs to investigate how to better handle it. there may be many cases.
📊 Benchmark Performance Reportgroup base pr
----- ---- --
pretty-ai-comprehensive-showcase 1.02 887.4±12.07µs ? ?/sec 1.00 873.8±8.25µs ? ?/sec
pretty-cetz-manual 1.06 743.1±12.71µs ? ?/sec 1.00 699.0±18.29µs ? ?/sec
pretty-codly 1.03 1783.1±20.77µs ? ?/sec 1.00 1735.7±16.14µs ? ?/sec
pretty-cpe 1.00 12.2±0.65ms ? ?/sec 1.15 14.0±1.59ms ? ?/sec
pretty-deep-nested-args 1.02 16.8±0.10µs ? ?/sec 1.00 16.4±0.39µs ? ?/sec
pretty-fletcher-diagram 1.04 520.3±10.78µs ? ?/sec 1.00 502.6±27.48µs ? ?/sec
pretty-fletcher-draw 1.02 1253.4±14.81µs ? ?/sec 1.00 1231.3±26.12µs ? ?/sec
pretty-tablex 1.03 3.3±0.02ms ? ?/sec 1.00 3.2±0.01ms ? ?/sec
pretty-touying-core 1.03 2.1±0.01ms ? ?/sec 1.00 2.1±0.01ms ? ?/sec
pretty-touying-utils 1.03 1198.4±19.63µs ? ?/sec 1.00 1164.5±14.71µs ? ?/sec
pretty-undergraduate-math 1.01 850.7±9.25µs ? ?/sec 1.00 845.9±21.69µs ? ?/sec 📏 Binary Size Comparison
📦 Detailed Crate Size Diff (cargo-bloat)Note: Numbers above are a result of guesswork. They are not 100% correct and never will be. @@ -1,17 +1,17 @@
std 395.9 kB
clap_builder 342.7 kB
-typstyle_core 216.6 kB
+typstyle_core 218.2 kB
clap_complete 131.6 kB
typst_syntax 120.2 kB
typstyle 54.4 kB
similar 33.7 kB
walkdir 19.8 kB
colored 9.0 kB
toml_edit 8.7 kB
+prettyless 8.3 kB
anyhow 8.3 kB
-prettyless 7.2 kB
path_absolutize 4.2 kB
hashbrown 4.1 kB
clap_lex 2.8 kB
parking_lot 2.6 kB
anstream 2.6 kB Generated by GitHub Actions on 2025-10-11 11:38:04 UTC |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #424 with the new pretty engine.
The trailing whitespaces in lines are not always trimmed. This keeps the contents of strings and raws.
Dependant: typstyle-rs/prettyless#11
We need to work out new apis if we do not want a breaking change in hard-line semantics.
Changes
Checklist
Before submitting, please ensure you've done the following:
Testing
Additional Notes