11418: fix: Update dependency, fix Markdown references r=Veykril a=HansAuger

Stumbled across this accidentally while familiarizing myself with the code base.

Update `pulldown-cmark-to-cmark` Fix for #11008  

Co-authored-by: Moritz Vetter <mv@3yourmind.com>
This commit is contained in:
bors[bot] 2022-02-06 08:54:34 +00:00 committed by GitHub
commit d2d137addd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 7 additions and 11 deletions

4
Cargo.lock generated
View File

@ -1245,9 +1245,9 @@ dependencies = [
[[package]] [[package]]
name = "pulldown-cmark-to-cmark" name = "pulldown-cmark-to-cmark"
version = "9.0.0" version = "10.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3f94dc756ef5c50ad28ccea8428ba5de9f4dca1fff6516a26b85e0b125a70d17" checksum = "d1dd19382cbbcee6ce498f65d5acaa6016e41ec701c9b0aef29a689bd7062f88"
dependencies = [ dependencies = [
"pulldown-cmark", "pulldown-cmark",
] ]

View File

@ -17,7 +17,7 @@ itertools = "0.10.0"
tracing = "0.1" tracing = "0.1"
rustc-hash = "1.1.0" rustc-hash = "1.1.0"
oorandom = "11.1.2" oorandom = "11.1.2"
pulldown-cmark-to-cmark = "9.0" pulldown-cmark-to-cmark = "10.0.0"
pulldown-cmark = { version = "0.9", default-features = false } pulldown-cmark = { version = "0.9", default-features = false }
url = "2.1.1" url = "2.1.1"
dot = "0.1.4" dot = "0.1.4"

View File

@ -7,7 +7,7 @@
use either::Either; use either::Either;
use pulldown_cmark::{BrokenLink, CowStr, Event, InlineStr, LinkType, Options, Parser, Tag}; use pulldown_cmark::{BrokenLink, CowStr, Event, InlineStr, LinkType, Options, Parser, Tag};
use pulldown_cmark_to_cmark::{cmark_with_options, Options as CMarkOptions}; use pulldown_cmark_to_cmark::{cmark_resume_with_options, Options as CMarkOptions};
use stdx::format_to; use stdx::format_to;
use url::Url; use url::Url;
@ -61,7 +61,7 @@ pub(crate) fn rewrite_links(db: &RootDatabase, markdown: &str, definition: Defin
} }
}); });
let mut out = String::new(); let mut out = String::new();
cmark_with_options( cmark_resume_with_options(
doc, doc,
&mut out, &mut out,
None, None,
@ -97,7 +97,7 @@ pub(crate) fn remove_links(markdown: &str) -> String {
}); });
let mut out = String::new(); let mut out = String::new();
cmark_with_options( cmark_resume_with_options(
doc, doc,
&mut out, &mut out,
None, None,

View File

@ -394,7 +394,6 @@ fn rewrite_struct() {
"#, "#,
expect![[r#"[my Foo](https://docs.rs/foo/*/foo/struct.Foo.html)"#]], expect![[r#"[my Foo](https://docs.rs/foo/*/foo/struct.Foo.html)"#]],
); );
// FIXME #11008
check_rewrite( check_rewrite(
r#" r#"
//- /main.rs crate:foo //- /main.rs crate:foo
@ -403,9 +402,6 @@ fn rewrite_struct() {
/// [`foo`]: Foo /// [`foo`]: Foo
pub struct $0Foo; pub struct $0Foo;
"#, "#,
expect![[r#" expect![["[`foo`]"]],
[`foo`]
[]: https://docs.rs/foo/*/foo/struct.Foo.html"#]],
); );
} }