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: do not add excessive space when item body is empty #229

Merged
merged 1 commit into from
Feb 19, 2025

Conversation

QuadnucYard
Copy link
Collaborator

Another compatible change. After this PR, the only breaking thing in typst 0.13 is comment placement.

The last space in the following source

#[/ foo: ]

lies in TermItem in 0.12, but lies in Markup in 0.13.
Now in both cases, the space can be stripped. So does the space before an item.

Moreover, if the item body is empty (only true for 0.13 in this case), no excessive space will be added after the marker. Previously, it would not converge.

Copy link

📊 Benchmark Performance Report

group                        base                                   pr
-----                        ----                                   --
attrs-cetz-manual            1.02     89.7±0.93µs        ? ?/sec    1.00     87.9±1.68µs        ? ?/sec
attrs-codly                  1.01    252.4±4.34µs        ? ?/sec    1.00    249.8±3.08µs        ? ?/sec
attrs-fletcher-diagram       1.03     55.4±0.57µs        ? ?/sec    1.00     53.9±0.67µs        ? ?/sec
attrs-fletcher-draw          1.01    157.8±2.28µs        ? ?/sec    1.00    156.3±2.51µs        ? ?/sec
attrs-tablex                 1.01   480.7±24.26µs        ? ?/sec    1.00    476.2±2.40µs        ? ?/sec
attrs-touying-core           1.01    306.4±2.98µs        ? ?/sec    1.00    304.6±3.03µs        ? ?/sec
attrs-touying-utils          1.00    164.1±1.93µs        ? ?/sec    1.00    164.1±1.83µs        ? ?/sec
attrs-undergraduate-math     1.01    122.4±4.64µs        ? ?/sec    1.00    120.8±3.50µs        ? ?/sec
pretty-cetz-manual           1.01    854.3±8.43µs        ? ?/sec    1.00    846.9±6.04µs        ? ?/sec
pretty-codly                 1.01  1935.4±16.41µs        ? ?/sec    1.00  1910.4±17.85µs        ? ?/sec
pretty-fletcher-diagram      1.01    548.9±8.01µs        ? ?/sec    1.00   544.2±11.35µs        ? ?/sec
pretty-fletcher-draw         1.01  1324.5±23.29µs        ? ?/sec    1.00  1305.9±12.83µs        ? ?/sec
pretty-tablex                1.00      3.6±0.01ms        ? ?/sec    1.00      3.6±0.02ms        ? ?/sec
pretty-touying-core          1.01      2.3±0.02ms        ? ?/sec    1.00      2.3±0.02ms        ? ?/sec
pretty-touying-utils         1.00  1294.8±10.79µs        ? ?/sec    1.00  1295.6±31.76µs        ? ?/sec
pretty-undergraduate-math    1.02   904.5±14.49µs        ? ?/sec    1.00    890.0±5.89µs        ? ?/sec

Generated by GitHub Actions on Wed Feb 19 14:17:17 UTC 2025

@QuadnucYard QuadnucYard merged commit f53670f into master Feb 19, 2025
18 checks passed
@QuadnucYard QuadnucYard deleted the fix-markup-space branch February 19, 2025 14:41
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