acdc-parser 0.11.0

`AsciiDoc` parser
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
//! Document type checks used by the block grammar.

use crate::DocumentAttributes;

pub(super) fn is_manpage_doctype(attrs: &DocumentAttributes<'_>) -> bool {
    matches!(
        attrs.get("doctype"),
        Some(value) if value.as_str() == Some("manpage")
    )
}

pub(super) fn is_book_doctype(attrs: &DocumentAttributes<'_>) -> bool {
    matches!(
        attrs.get("doctype"),
        Some(value) if value.as_str() == Some("book")
    )
}