Rollup merge of #111152 - lukas-code:markdown-parsers-are-hard, r=GuillaumeGomez
update `pulldown-cmark` to `0.9.3` This PR updates `pulldown-cmark` to version `0.9.3`, which does two main things: * Pulls in https://github.com/raphlinus/pulldown-cmark/pull/643 to fix https://github.com/rust-lang/rust/issues/111117 * Allows parsing strikethrough with single tildes, e.g. `~foo~` -> ~foo~. This matches the [GFM spec](https://github.github.com/gfm/#strikethrough-extension-). Full changelog: https://github.com/raphlinus/pulldown-cmark/pull/646
This commit is contained in:
commit
bd7e8b5ef9
@ -2779,9 +2779,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",
|
||||
|
@ -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" }
|
||||
|
@ -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].
|
||||
|
||||
|
@ -340,3 +340,15 @@ macro_rules! 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;
|
||||
}
|
||||
|
@ -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
|
||||
|
|
||||
@ -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
|
||||
|
||||
|
@ -1,6 +0,0 @@
|
||||
#![crate_name = "foo"]
|
||||
|
||||
// @has foo/index.html '//del' 'strike'
|
||||
|
||||
/// ~~strike~~
|
||||
pub fn strike() {}
|
@ -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() {}
|
||||
|
Loading…
Reference in New Issue
Block a user