Reproduce with: ```ruby require 'better_html' require 'better_html/parser' b = Parser::Source::Buffer.new('(buffer)'); b.source = '<![CDATA[foo]]><![CDATA[bar]]>' BetterHtml::Parser.new(b).inspect ``` Result: ``` RuntimeError: Unhandled token cdata_end line 1 column 27, [s(:cdata, "foo"), s(:text, "<![CDATA[bar")] from better_html-1.0.16/lib/better_html/parser.rb:79:in `build_document_node' ``` The problem is in [html_tokenizer](https://github.com/EiNSTeiN-/html_tokenizer) and a PR with a fix available: https://github.com/EiNSTeiN-/html_tokenizer/pull/7