Skip to content

feat: format mixed markup lines with break suppressed#244

Merged
Enter-tainer merged 1 commit intotypstyle-rs:masterfrom
QuadnucYard:mixed-text
Mar 26, 2025
Merged

feat: format mixed markup lines with break suppressed#244
Enter-tainer merged 1 commit intotypstyle-rs:masterfrom
QuadnucYard:mixed-text

Conversation

@QuadnucYard
Copy link
Copy Markdown
Collaborator

@QuadnucYard QuadnucYard commented Mar 24, 2025

Resolves #142.

We introduce a break-suppressing rule. If an expression is mixed in texts, it will not break inside if it is single-line.

New tests are generated by Claude 3.7.

Note

If a block-level element (e.g., equation or multiline-raw block) appears in texts, we can insert line breaks before and after it. Needs discussion.

@github-actions
Copy link
Copy Markdown

github-actions bot commented Mar 24, 2025

📊 Benchmark Performance Report

group                        base                                   pr
-----                        ----                                   --
attrs-cetz-manual            1.00     86.4±1.06µs        ? ?/sec    1.01     87.5±0.75µs        ? ?/sec
attrs-codly                  1.01   245.4±13.66µs        ? ?/sec    1.00    242.1±3.85µs        ? ?/sec
attrs-fletcher-diagram       1.00     51.1±0.49µs        ? ?/sec    1.02     52.3±0.38µs        ? ?/sec
attrs-fletcher-draw          1.00    153.4±1.88µs        ? ?/sec    1.01    154.2±2.17µs        ? ?/sec
attrs-tablex                 1.00    465.5±3.97µs        ? ?/sec    1.00    463.6±3.28µs        ? ?/sec
attrs-touying-core           1.00    297.3±5.68µs        ? ?/sec    1.00    296.7±2.38µs        ? ?/sec
attrs-touying-utils          1.01    161.0±2.82µs        ? ?/sec    1.00    159.6±1.50µs        ? ?/sec
attrs-undergraduate-math     1.00    120.9±2.44µs        ? ?/sec    1.00    120.6±1.40µs        ? ?/sec
pretty-cetz-manual           1.07    803.9±5.46µs        ? ?/sec    1.00    752.7±6.50µs        ? ?/sec
pretty-codly                 1.03  1851.1±17.24µs        ? ?/sec    1.00  1805.4±29.77µs        ? ?/sec
pretty-fletcher-diagram      1.03    530.6±9.11µs        ? ?/sec    1.00    513.8±7.50µs        ? ?/sec
pretty-fletcher-draw         1.04  1284.6±17.09µs        ? ?/sec    1.00  1238.5±31.55µs        ? ?/sec
pretty-tablex                1.03      3.5±0.03ms        ? ?/sec    1.00      3.4±0.03ms        ? ?/sec
pretty-touying-core          1.03      2.2±0.01ms        ? ?/sec    1.00      2.2±0.01ms        ? ?/sec
pretty-touying-utils         1.03  1239.6±13.28µs        ? ?/sec    1.00  1202.1±18.53µs        ? ?/sec
pretty-undergraduate-math    1.02    865.2±7.39µs        ? ?/sec    1.00   845.5±37.95µs        ? ?/sec

Generated by GitHub Actions on Tue Mar 25 05:11:11 UTC 2025

Copy link
Copy Markdown
Collaborator

@Enter-tainer Enter-tainer left a comment

Choose a reason for hiding this comment

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

LGTM

@Enter-tainer Enter-tainer merged commit 5f80397 into typstyle-rs:master Mar 26, 2025
15 checks passed
@QuadnucYard QuadnucYard deleted the mixed-text branch March 26, 2025 14:46
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.

Format inline items in text

2 participants