Disable definition lists in Markdown (#17648)

This PR disables definition list support in `pulldown_cmark`, as it is
has been causing a number of issues.

I opened an issue upstream with the panic we were seeing:
https://github.com/pulldown-cmark/pulldown-cmark/issues/957.

Release Notes:

- N/A
This commit is contained in:
Marshall Bowers 2024-09-10 11:16:27 -04:00 committed by GitHub
parent 93b3520c11
commit a078cb104c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 12 additions and 3 deletions

View file

@ -166,6 +166,7 @@ pub async fn parse_markdown_block(
let mut list_stack = Vec::new();
let mut options = pulldown_cmark::Options::all();
options.remove(pulldown_cmark::Options::ENABLE_DEFINITION_LIST);
options.remove(pulldown_cmark::Options::ENABLE_YAML_STYLE_METADATA_BLOCKS);
for event in Parser::new_ext(markdown, options) {
@ -384,6 +385,7 @@ public: void format(const int &, const std::tm &, int &dest)
"#;
let mut options = pulldown_cmark::Options::all();
options.remove(pulldown_cmark::Options::ENABLE_DEFINITION_LIST);
options.remove(pulldown_cmark::Options::ENABLE_YAML_STYLE_METADATA_BLOCKS);
let parser = pulldown_cmark::Parser::new_ext(input, options);