fn try_parent_blocktag(node: &NodeRef) -> Result<BlockTag, Error> {
    node
        .parent()
        .ok_or(format_err!("{:?} has no parent", node.to_string()))?
        .as_element()
        .ok_or(format_err!("{:?} parent not an element", node.to_string()))?
        .name.local.to_string()
        .parse()
}
/// Tries to get parent node's tag,
/// succeeds only if the tag is a BlockTag
Tries to get parent node's tag,
succeeds only if the tag is a BlockTag
Tries to get parent node ' s tag succeeds only if the tag is a BlockTag
fn try_parent_blocktag(node: &NodeRef) -> Result<BlockTag, Error> {
    node
        .parent()
        .ok_or(format_err!("{:?} has no parent", node.to_string()))?
        .as_element()
        .ok_or(format_err!("{:?} parent not an element", node.to_string()))?
        .name.local.to_string()
        .parse()
}
fn try_parent_blocktag ( node : & NodeRef ) -> Result < BlockTag , Error > { node . parent ( ) . ok_or ( format_err ! ( " " node to_string ( ) ) ) ? . as_element ( ) . ok_or ( format_err ! ( " " node to_string ( ) ) ) ? . name . local . to_string ( ) . parse ( ) }
Tries to get parent node's tag,
succeeds only if the tag is a BlockTag
Tries to get parent node ' s tag succeeds only if the tag is a BlockTag
node
&NodeRef
node
&NodeRef