oga/spec/support
Yorick Peterse 8acc7fc743 Lex CDATA tags in chunks
Instead of using a single token (T_CDATA) for a CDATA tag the lexer now
uses 3 tokens:

1. T_CDATA_START
2. T_CDATA_BODY
3. T_CDATA_END

The T_CDATA_BODY token can occur multiple times and is turned into a
single value in the XML parser. This is similar to the way strings are
lexed.

By changing the way CDATA tags are lexed Oga can now lex CDATA tags
containing newlines when using an IO as input. For example, this would
previously fail:

    Oga.parse_xml(StringIO.new("<![CDATA[\nfoo]]>"))

Because IO input reads input per line the input for the lexer would be
as following:

    "<![CDATA[\n"
    "foo]]>"

Related issues: #93
2015-04-14 22:45:55 +02:00
..
evaluation_helpers.rb Renamed rspec helper files 2015-03-22 22:50:03 +01:00
parsing_helpers.rb Lex CDATA tags in chunks 2015-04-14 22:45:55 +02:00
simplecov.rb Added groups for code coverage results. 2014-06-23 09:43:41 +02:00
threading_helpers.rb Added thread-safe LRU class 2015-03-23 00:21:52 +01:00