Skip to content

Commit ba2ef69

Browse files
author
Moritz Vetter
committed
Bump pulldown-cmark-to-cmark, adjust usages and fix test
1 parent 6689470 commit ba2ef69

File tree

4 files changed

+7
-11
lines changed

4 files changed

+7
-11
lines changed

Cargo.lock

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

crates/ide/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ itertools = "0.10.0"
1717
tracing = "0.1"
1818
rustc-hash = "1.1.0"
1919
oorandom = "11.1.2"
20-
pulldown-cmark-to-cmark = "9.0"
20+
pulldown-cmark-to-cmark = "10.0.0"
2121
pulldown-cmark = { version = "0.9", default-features = false }
2222
url = "2.1.1"
2323
dot = "0.1.4"

crates/ide/src/doc_links.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ mod intra_doc_links;
77

88
use either::Either;
99
use pulldown_cmark::{BrokenLink, CowStr, Event, InlineStr, LinkType, Options, Parser, Tag};
10-
use pulldown_cmark_to_cmark::{cmark_with_options, Options as CMarkOptions};
10+
use pulldown_cmark_to_cmark::{cmark_resume_with_options, Options as CMarkOptions};
1111
use stdx::format_to;
1212
use url::Url;
1313

@@ -61,7 +61,7 @@ pub(crate) fn rewrite_links(db: &RootDatabase, markdown: &str, definition: Defin
6161
}
6262
});
6363
let mut out = String::new();
64-
cmark_with_options(
64+
cmark_resume_with_options(
6565
doc,
6666
&mut out,
6767
None,
@@ -97,7 +97,7 @@ pub(crate) fn remove_links(markdown: &str) -> String {
9797
});
9898

9999
let mut out = String::new();
100-
cmark_with_options(
100+
cmark_resume_with_options(
101101
doc,
102102
&mut out,
103103
None,

crates/ide/src/doc_links/tests.rs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -394,7 +394,6 @@ pub struct $0Foo;
394394
"#,
395395
expect![[r#"[my Foo](https://docs.rs/foo/*/foo/struct.Foo.html)"#]],
396396
);
397-
// FIXME #11008
398397
check_rewrite(
399398
r#"
400399
//- /main.rs crate:foo
@@ -403,9 +402,6 @@ pub struct $0Foo;
403402
/// [`foo`]: Foo
404403
pub struct $0Foo;
405404
"#,
406-
expect![[r#"
407-
[`foo`]
408-
409-
[]: https://docs.rs/foo/*/foo/struct.Foo.html"#]],
405+
expect![["[`foo`]"]],
410406
);
411407
}

0 commit comments

Comments
 (0)