Skip to content

Fix smart punctuation inside grammar terminals #1869

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

Merged
merged 1 commit into from
Jun 24, 2025

Conversation

ehuss
Copy link
Contributor

@ehuss ehuss commented Jun 22, 2025

Smart punctuation was converting ... to . This fixes it so that it will be escaped to avoid the conversion. This normally doesn't happen inside a backtick code block, but since we are using spans for terminals, pulldown-cmark is accidentally picking them up.

This also includes hyphen to handle en-dash and em-dash, though we don't have those.

Fixes #1867

Smart punctuation was converting `...` to `…`. This fixes it so that it
will be escaped to avoid the conversion. This normally doesn't happen
inside a backtick code block, but since we are using spans for
terminals, pulldown-cmark is accidentally picking them up.

This also includes hyphen to handle en-dash and em-dash, though we don't
have those.

Fixes rust-lang#1867
@rustbot rustbot added the S-waiting-on-review Status: The marked PR is awaiting review from a maintainer label Jun 22, 2025
@traviscross traviscross added this pull request to the merge queue Jun 24, 2025
Merged via the queue into rust-lang:master with commit fb58c5d Jun 24, 2025
5 checks passed
bors added a commit to rust-lang/rust that referenced this pull request Jun 25, 2025
[beta] update cargo and reference

## cargo

1 commits in 84709f085062cbf3c51fa507527c1b2334015178..c24e1064277fe51ab72011e2612e556ac56addf7
2025-06-22 23:58:39 +0000 to 2025-06-23 13:53:07 -0700
- [Beta-1.89] Fix potential deadlock in `CacheState::lock` (rust-lang/cargo#15699)

### reference

3 commits in 50fc1628f36563958399123829c73755fa7a8421..9571d4d38cc580bd9fe926f97fccd98f215564a9
2025-06-19 02:02:39 +0000 to 2025-06-24 22:32:56 +0000
- Add new temporary lifetime extension rule (rust-lang/reference#1813)
- Fix smart punctuation inside grammar terminals (rust-lang/reference#1869)
- Fix placement of codegen link definitions (rust-lang/reference#1868)
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Jun 30, 2025
Update books

## rust-lang/book

2 commits in 8a6d44e45b7b564eeb6bae30507e1fbac439d72d..ef1ce8f87a8b18feb1b6a9cf9a4939a79bde6795
2025-06-28 18:06:08 UTC to 2025-06-26 23:08:19 UTC

- Chapter 14 from tech review (rust-lang/book#4423)
- Chapter 13 from tech review (rust-lang/book#4421)

## rust-embedded/book

1 commits in 10fa1e084365f23f24ad0000df541923385b73b6..41f688a598a5022b749e23d37f3c524f6a0b28e1
2025-06-27 07:21:31 UTC to 2025-06-27 07:21:31 UTC

- Fix incorrect type for semihosted stdout stream rust-lang#394 (rust-embedded/book#395)

## rust-lang/reference

4 commits in 50fc1628f36563958399123829c73755fa7a8421..e9fc99f107840813916f62e16b3f6d9556e1f2d8
2025-06-28 20:00:14 UTC to 2025-06-24 19:02:48 UTC

- fix: swap places for 2 words in associated-items.md sentence. (rust-lang/reference#1871)
- Add new temporary lifetime extension rule (rust-lang/reference#1813)
- Fix smart punctuation inside grammar terminals (rust-lang/reference#1869)
- Fix placement of codegen link definitions (rust-lang/reference#1868)

## rust-lang/rust-by-example

1 commits in 05c7d8bae65f23a1837430c5a19be129d414f5ec..288b4e4948add43f387cad35adc7b1c54ca6fe12
2025-06-25 12:35:59 UTC to 2025-06-25 12:35:59 UTC

- allow easy fixes (rust-lang/rust-by-example#1941)
rust-timer added a commit to rust-lang/rust that referenced this pull request Jul 1, 2025
Rollup merge of #143248 - rustbot:docs-update, r=ehuss

Update books

## rust-lang/book

2 commits in 8a6d44e45b7b564eeb6bae30507e1fbac439d72d..ef1ce8f87a8b18feb1b6a9cf9a4939a79bde6795
2025-06-28 18:06:08 UTC to 2025-06-26 23:08:19 UTC

- Chapter 14 from tech review (rust-lang/book#4423)
- Chapter 13 from tech review (rust-lang/book#4421)

## rust-embedded/book

1 commits in 10fa1e084365f23f24ad0000df541923385b73b6..41f688a598a5022b749e23d37f3c524f6a0b28e1
2025-06-27 07:21:31 UTC to 2025-06-27 07:21:31 UTC

- Fix incorrect type for semihosted stdout stream #394 (rust-embedded/book#395)

## rust-lang/reference

4 commits in 50fc1628f36563958399123829c73755fa7a8421..e9fc99f107840813916f62e16b3f6d9556e1f2d8
2025-06-28 20:00:14 UTC to 2025-06-24 19:02:48 UTC

- fix: swap places for 2 words in associated-items.md sentence. (rust-lang/reference#1871)
- Add new temporary lifetime extension rule (rust-lang/reference#1813)
- Fix smart punctuation inside grammar terminals (rust-lang/reference#1869)
- Fix placement of codegen link definitions (rust-lang/reference#1868)

## rust-lang/rust-by-example

1 commits in 05c7d8bae65f23a1837430c5a19be129d414f5ec..288b4e4948add43f387cad35adc7b1c54ca6fe12
2025-06-25 12:35:59 UTC to 2025-06-25 12:35:59 UTC

- allow easy fixes (rust-lang/rust-by-example#1941)
github-actions bot pushed a commit to rust-lang/miri that referenced this pull request Jul 1, 2025
Update books

## rust-lang/book

2 commits in 8a6d44e45b7b564eeb6bae30507e1fbac439d72d..ef1ce8f87a8b18feb1b6a9cf9a4939a79bde6795
2025-06-28 18:06:08 UTC to 2025-06-26 23:08:19 UTC

- Chapter 14 from tech review (rust-lang/book#4423)
- Chapter 13 from tech review (rust-lang/book#4421)

## rust-embedded/book

1 commits in 10fa1e084365f23f24ad0000df541923385b73b6..41f688a598a5022b749e23d37f3c524f6a0b28e1
2025-06-27 07:21:31 UTC to 2025-06-27 07:21:31 UTC

- Fix incorrect type for semihosted stdout stream rust-lang/rust#394 (rust-embedded/book#395)

## rust-lang/reference

4 commits in 50fc1628f36563958399123829c73755fa7a8421..e9fc99f107840813916f62e16b3f6d9556e1f2d8
2025-06-28 20:00:14 UTC to 2025-06-24 19:02:48 UTC

- fix: swap places for 2 words in associated-items.md sentence. (rust-lang/reference#1871)
- Add new temporary lifetime extension rule (rust-lang/reference#1813)
- Fix smart punctuation inside grammar terminals (rust-lang/reference#1869)
- Fix placement of codegen link definitions (rust-lang/reference#1868)

## rust-lang/rust-by-example

1 commits in 05c7d8bae65f23a1837430c5a19be129d414f5ec..288b4e4948add43f387cad35adc7b1c54ca6fe12
2025-06-25 12:35:59 UTC to 2025-06-25 12:35:59 UTC

- allow easy fixes (rust-lang/rust-by-example#1941)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: The marked PR is awaiting review from a maintainer
Projects
None yet
Development

Successfully merging this pull request may close these issues.

mdBook smart punctuation is harmful to inline code snippets
3 participants