From 65932289f78b5699c5ed960ce40c8c4695d7f00b Mon Sep 17 00:00:00 2001 From: Eric Huss Date: Thu, 16 May 2024 18:08:09 -0700 Subject: [PATCH 1/2] Revert "Merge pull request #2381 from ehuss/update-pulldown-cmark" This reverts commit 8884008b4d10381316288badd588227da80f5820, (https://github.com/rust-lang/mdBook/pull/2381) reversing changes made to 3d6caa504f883f646eb98869eeb63e59b3fa7aa6. The `pulldown_cmark` types are a public API, which I did not realize. --- Cargo.lock | 8 ++++---- Cargo.toml | 2 +- src/renderer/html_handlebars/search.rs | 5 +---- 3 files changed, 6 insertions(+), 9 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 0e162ed6a1..d627e7f35a 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1411,9 +1411,9 @@ dependencies = [ [[package]] name = "pulldown-cmark" -version = "0.11.0" +version = "0.10.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8746739f11d39ce5ad5c2520a9b75285310dbfe78c541ccf832d38615765aec0" +checksum = "76979bea66e7875e7509c4ec5300112b316af87fa7a252ca91c448b32dfe3993" dependencies = [ "bitflags 2.5.0", "memchr", @@ -1423,9 +1423,9 @@ dependencies = [ [[package]] name = "pulldown-cmark-escape" -version = "0.11.0" +version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "007d8adb5ddab6f8e3f491ac63566a7d5002cc7ed73901f72057943fa71ae1ae" +checksum = "bd348ff538bc9caeda7ee8cad2d1d48236a1f443c1fa3913c6a02fe0043b1dd3" [[package]] name = "quote" diff --git a/Cargo.toml b/Cargo.toml index ebcbffe301..49d17bbeb7 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -27,7 +27,7 @@ handlebars = "5.0" log = "0.4.17" memchr = "2.5.0" opener = "0.7.0" -pulldown-cmark = { version = "0.11.0", default-features = false, features = ["html"] } +pulldown-cmark = { version = "0.10.0", default-features = false, features = ["html"] } regex = "1.8.1" serde = { version = "1.0.163", features = ["derive"] } serde_json = "1.0.96" diff --git a/src/renderer/html_handlebars/search.rs b/src/renderer/html_handlebars/search.rs index 968894bd9d..1144c9f588 100644 --- a/src/renderer/html_handlebars/search.rs +++ b/src/renderer/html_handlebars/search.rs @@ -193,10 +193,7 @@ fn render_item( body.push(' '); } } - Event::Text(text) - | Event::Code(text) - | Event::InlineMath(text) - | Event::DisplayMath(text) => { + Event::Text(text) | Event::Code(text) => { if in_heading { heading.push_str(&text); } else { From 2bdb5866a7ef8fecdc3d98977df8ca8e400967aa Mon Sep 17 00:00:00 2001 From: Eric Huss Date: Thu, 16 May 2024 18:10:56 -0700 Subject: [PATCH 2/2] Add comment not to update pulldown-cmark. --- Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index 49d17bbeb7..bcc9e4f30c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -27,7 +27,7 @@ handlebars = "5.0" log = "0.4.17" memchr = "2.5.0" opener = "0.7.0" -pulldown-cmark = { version = "0.10.0", default-features = false, features = ["html"] } +pulldown-cmark = { version = "0.10.0", default-features = false, features = ["html"] } # Do not update, part of the public api. regex = "1.8.1" serde = { version = "1.0.163", features = ["derive"] } serde_json = "1.0.96"