Skip to content

Commit c9c9b4e

Browse files
bors[bot]Veykril
andauthored
Merge #8823
8823: Enable OPTION::ENABLE_TASKLISTS in pulldown_cmark r=Veykril a=Veykril Closes #8821 Co-authored-by: Lukas Wirth <[email protected]>
2 parents 38a53c2 + 07fe9a8 commit c9c9b4e

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

crates/ide/src/doc_links.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,8 @@ pub(crate) type DocumentationLink = String;
2929
/// Rewrite documentation links in markdown to point to an online host (e.g. docs.rs)
3030
pub(crate) fn rewrite_links(db: &RootDatabase, markdown: &str, definition: &Definition) -> String {
3131
let mut cb = broken_link_clone_cb;
32-
let doc = Parser::new_with_broken_link_callback(markdown, Options::empty(), Some(&mut cb));
32+
let doc =
33+
Parser::new_with_broken_link_callback(markdown, Options::ENABLE_TASKLISTS, Some(&mut cb));
3334

3435
let doc = map_links(doc, |target, title: &str| {
3536
// This check is imperfect, there's some overlap between valid intra-doc links
@@ -64,8 +65,7 @@ pub(crate) fn rewrite_links(db: &RootDatabase, markdown: &str, definition: &Defi
6465
pub(crate) fn remove_links(markdown: &str) -> String {
6566
let mut drop_link = false;
6667

67-
let mut opts = Options::empty();
68-
opts.insert(Options::ENABLE_FOOTNOTES);
68+
let opts = Options::ENABLE_TASKLISTS | Options::ENABLE_FOOTNOTES;
6969

7070
let mut cb = |_: BrokenLink| {
7171
let empty = InlineStr::try_from("").unwrap();
@@ -123,7 +123,7 @@ pub(crate) fn extract_definitions_from_markdown(
123123
) -> Vec<(TextRange, String, Option<hir::Namespace>)> {
124124
Parser::new_with_broken_link_callback(
125125
markdown,
126-
Options::empty(),
126+
Options::ENABLE_TASKLISTS,
127127
Some(&mut broken_link_clone_cb),
128128
)
129129
.into_offset_iter()

0 commit comments

Comments
 (0)