make Event::is_{,container_}block public

this is only used by html renderer, may be useful for other renderers
also
This commit is contained in:
Noah Hellman 2023-02-12 00:57:11 +01:00
parent 413fecfe6a
commit c3ff064c78

View file

@ -241,7 +241,8 @@ pub enum Container<'s> {
impl<'s> Container<'s> { impl<'s> Container<'s> {
/// Is a block element. /// Is a block element.
fn is_block(&self) -> bool { #[must_use]
pub fn is_block(&self) -> bool {
match self { match self {
Self::Blockquote Self::Blockquote
| Self::List { .. } | Self::List { .. }
@ -278,7 +279,8 @@ impl<'s> Container<'s> {
} }
/// Is a block element that may contain children blocks. /// Is a block element that may contain children blocks.
fn is_block_container(&self) -> bool { #[must_use]
pub fn is_block_container(&self) -> bool {
match self { match self {
Self::Blockquote Self::Blockquote
| Self::List { .. } | Self::List { .. }