pub fn collect_text<'a>(node: &'a AstNode<'a>, output: &mut Vec<u8>) {
    match node.data.borrow().value {
        NodeValue::Text(ref literal) => output.extend_from_slice(literal),
        NodeValue::Code(ref literal) => {
            output.push(b'`');
            output.extend_from_slice(literal);
            output.push(b'`');
        }
        NodeValue::LineBreak | NodeValue::SoftBreak => output.push(b' '),
        _ => {
            for n in node.children() {
                collect_text(n, output);
            }
        }
    }
}
/// Collects text from `node` and all descendants, then appends it to `output`.
Collects text from `node` and all descendants, then appends it to `output`.
Collects text from ` node ` and all descendants then appends it to ` output ` .
pub fn collect_text<'a>(node: &'a AstNode<'a>, output: &mut Vec<u8>) {
    match node.data.borrow().value {
        NodeValue::Text(ref literal) => output.extend_from_slice(literal),
        NodeValue::Code(ref literal) => {
            output.push(b'`');
            output.extend_from_slice(literal);
            output.push(b'`');
        }
        NodeValue::LineBreak | NodeValue::SoftBreak => output.push(b' '),
        _ => {
            for n in node.children() {
                collect_text(n, output);
            }
        }
    }
}
pub fn collect_text < ' a > ( node : & ' a AstNode < ' a > , output : & mut Vec < u8 > ) { match node . data . borrow ( ) . value { NodeValue :: Text ( ref literal ) => output . extend_from_slice ( literal ) , NodeValue :: Code ( ref literal ) => { output . push ( b'`' ) ; output . extend_from_slice ( literal ) ; output . push ( b'`' ) ; } NodeValue :: LineBreak | NodeValue :: SoftBreak => output . push ( b' ' ) , _ => { for n in node . children ( ) { collect_text ( n , output ) ; } } } }
Collects text from `node` and all descendants, then appends it to `output`.
Collects text from ` node ` and all descendants then appends it to ` output ` .
node
&'a AstNode<'a>
output
&mut Vec<u8>
node
&'a AstNode<'a>
output
&mut Vec<u8>