html5ever
html5ever copied to clipboard
Improving h5e/x5e extension story
Hi, for issue #323 I was writing a small TokenSink implementation. And to be honest, it took me good half-hour, to hour for that simplistic implementation.
I think what we might need is better docs, and possibly some convenience method. One pain point was adding following part:
let _ = tok.feed(&mut input);
tok.end();
Do we need a different tok.feed and tok.end() methods? Can they be let _ = tok.exec(&mut input)?
One thing that also irked me, was that I couldn't have implemented was to have tokenizer abort when encountering anything that isn't Text token?