etch 0.4.2

Not just a text formatter, don't mark it down, etch it.
Documentation
use crate::nodes::Node;
use crate::plugins::Plugin;
use crate::state::*;

#[derive(Debug, PartialEq)]
pub struct WordCountPlugin {
    pub words: usize,
}

impl WordCountPlugin {
    pub fn new() -> Shared<Self> {
        Shared::share(WordCountPlugin { words: 0 })
    }
}

impl Plugin for WordCountPlugin {
    fn on_node_parsed(&mut self, token: Node) -> Node {
        if let Node::Word { .. } = token {
            self.words += 1;
        }

        token
    }
}