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]]
name = "pulldown-cmark-to-cmark"
version = "9.0.0"
version = "10.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3f94dc756ef5c50ad28ccea8428ba5de9f4dca1fff6516a26b85e0b125a70d17"
checksum = "d1dd19382cbbcee6ce498f65d5acaa6016e41ec701c9b0aef29a689bd7062f88"
dependencies = [
"pulldown-cmark",
]

View file

@ -17,7 +17,7 @@ itertools = "0.10.0"
tracing = "0.1"
rustc-hash = "1.1.0"
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 }
url = "2.1.1"
dot = "0.1.4"

View file

@ -7,7 +7,7 @@ mod intra_doc_links;
use either::Either;
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 url::Url;
@ -61,7 +61,7 @@ pub(crate) fn rewrite_links(db: &RootDatabase, markdown: &str, definition: Defin
}
});
let mut out = String::new();
cmark_with_options(
cmark_resume_with_options(
doc,
&mut out,
None,
@ -97,7 +97,7 @@ pub(crate) fn remove_links(markdown: &str) -> String {
});
let mut out = String::new();
cmark_with_options(
cmark_resume_with_options(
doc,
&mut out,
None,

View file

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