Skip to content

Commit

Permalink
Merge #11418
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
bors[bot] and Moritz Vetter authored Feb 6, 2022
2 parents 6689470 + ba2ef69 commit d2d137a
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 11 deletions.
4 changes: 2 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion crates/ide/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
6 changes: 3 additions & 3 deletions crates/ide/src/doc_links.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down
6 changes: 1 addition & 5 deletions crates/ide/src/doc_links/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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`]"]],
);
}

0 comments on commit d2d137a

Please sign in to comment.