mirror of
https://github.com/zed-industries/zed.git
synced 2024-12-29 12:38:02 +00:00
markdown: Handle definition lists in parser (#17617)
Resolves https://github.com/zed-industries/zed/issues/17607. This PR makes it so the Markdown parser can handle Markdown containing definition lists. Note that this is just parser support, we aren't yet doing anything with the definition lists themselves. Release Notes: - N/A
This commit is contained in:
parent
c1193875e8
commit
da9601c698
1 changed files with 7 additions and 5 deletions
|
@ -232,6 +232,10 @@ pub enum MarkdownTag {
|
|||
|
||||
/// A metadata block.
|
||||
MetadataBlock(MetadataBlockKind),
|
||||
|
||||
DefinitionList,
|
||||
DefinitionListTitle,
|
||||
DefinitionListDefinition,
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, PartialEq)]
|
||||
|
@ -317,11 +321,9 @@ impl From<pulldown_cmark::Tag<'_>> for MarkdownTag {
|
|||
},
|
||||
pulldown_cmark::Tag::HtmlBlock => MarkdownTag::HtmlBlock,
|
||||
pulldown_cmark::Tag::MetadataBlock(kind) => MarkdownTag::MetadataBlock(kind),
|
||||
pulldown_cmark::Tag::DefinitionList
|
||||
| pulldown_cmark::Tag::DefinitionListTitle
|
||||
| pulldown_cmark::Tag::DefinitionListDefinition => {
|
||||
unimplemented!("definition lists are not yet supported")
|
||||
}
|
||||
pulldown_cmark::Tag::DefinitionList => MarkdownTag::DefinitionList,
|
||||
pulldown_cmark::Tag::DefinitionListTitle => MarkdownTag::DefinitionListTitle,
|
||||
pulldown_cmark::Tag::DefinitionListDefinition => MarkdownTag::DefinitionListDefinition,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue