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

update pulldown-cmark to 0.9.3 #111152

Merged
merged 4 commits into from
May 26, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Cargo.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2747,9 +2747,9 @@ dependencies = [

[[package]]
name = "pulldown-cmark"
version = "0.9.2"
version = "0.9.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2d9cc634bc78768157b5cbfe988ffcd1dcba95cd2b2f03a88316c08c6d00ed63"
checksum = "77a1a2f1f0a7ecff9c31abbe177637be0e97a0aef46cf8738ece09327985d998"
dependencies = [
"bitflags",
"memchr",
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_resolve/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ edition = "2021"

[dependencies]
bitflags = "1.2.1"
pulldown-cmark = { version = "0.9.2", default-features = false }
pulldown-cmark = { version = "0.9.3", default-features = false }
rustc_arena = { path = "../rustc_arena" }
rustc_ast = { path = "../rustc_ast" }
rustc_ast_pretty = { path = "../rustc_ast_pretty" }
Expand Down
6 changes: 3 additions & 3 deletions src/doc/rustdoc/src/how-to-write-documentation.md
Original file line number Diff line number Diff line change
Expand Up @@ -165,15 +165,15 @@ extensions:
### Strikethrough

Text may be rendered with a horizontal line through the center by wrapping the
text with two tilde characters on each side:
text with one or two tilde characters on each side:

```text
An example of ~~strikethrough text~~.
An example of ~~strikethrough text~~. You can also use ~single tildes~.
```

This example will render as:

> An example of ~~strikethrough text~~.
> An example of ~~strikethrough text~~. You can also use ~single tildes~.

This follows the [GitHub Strikethrough extension][strikethrough].

Expand Down
12 changes: 12 additions & 0 deletions tests/rustdoc-ui/unescaped_backticks.rs
Original file line number Diff line number Diff line change
Expand Up @@ -340,3 +340,15 @@ id! {
/// level changes.
pub mod tracing_macro {}
}

/// Regression test for <https://github.com/rust-lang/rust/issues/111117>
pub mod trillium_server_common {
/// One-indexed, because the first CloneCounter is included. If you don't
/// want the original to count, construct a [``CloneCounterObserver`]
/// instead and use [`CloneCounterObserver::counter`] to increment.
//~^ ERROR unescaped backtick
pub struct CloneCounter;

/// This is used by the above.
pub struct CloneCounterObserver;
}
14 changes: 13 additions & 1 deletion tests/rustdoc-ui/unescaped_backticks.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -341,6 +341,18 @@ LL | | /// level changes.
change: [`rebuild_interest_cache`][rebuild] is called after the value of the max
to this: [`rebuild_interest_cache\`][rebuild] is called after the value of the max

error: unescaped backtick
--> $DIR/unescaped_backticks.rs:348:56
|
LL | /// instead and use [`CloneCounterObserver::counter`] to increment.
| ^
|
= help: the opening or closing backtick of an inline code may be missing
help: if you meant to use a literal backtick, escape it
|
LL | /// instead and use [`CloneCounterObserver::counter\`] to increment.
| +

error: unescaped backtick
--> $DIR/unescaped_backticks.rs:11:5
|
Expand Down Expand Up @@ -955,5 +967,5 @@ help: if you meant to use a literal backtick, escape it
LL | /// | table`( | )\`body |
| +

error: aborting due to 63 previous errors
error: aborting due to 64 previous errors

6 changes: 0 additions & 6 deletions tests/rustdoc/strikethrough-in-summary.rs

This file was deleted.

13 changes: 10 additions & 3 deletions tests/rustdoc/test-strikethrough.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
#![crate_name = "foo"]

// @has foo/fn.f.html
// @has - //del "Y"
/// ~~Y~~
// Test that strikethrough works with single and double tildes and that it shows up on
// the item's dedicated page as well as the parent module's summary of items.

// @has foo/index.html //del 'strike'
// @has foo/index.html //del 'through'

// @has foo/fn.f.html //del 'strike'
// @has foo/fn.f.html //del 'through'

/// ~~strike~~ ~through~
pub fn f() {}