Howdy!
Today I tried adding a matcher using the example syntax:
let quote_emitter: EmitScope = Arc::new(|open_capture, body, _| {
let cite_with_post_id = open_capture.unwrap().name("cite").unwrap().as_str();
let (cite, post_id) = cite_with_post_id.split_once(';')
.expect("String couldn't be parsed");
format!(r#"<blockquote{cite_with_post_id}><span class="citation" data-post-id="{post_id}">Posted by {cite}</span>{body}</blockquote>"#)
});
BBCode::add_tagmatcher(&mut matchers, "quote", ScopeInfo::basic(quote_emitter), None, None)
.expect("Failed to add matcher");
But unfortunately the default handler is always used.
Perhaps, on add_tagmatcher, replace any existing matchers with the exact same "target", rather than appending them to the end?