6b779d7883
This adds lexing support for HTML/XML such as: <foo bar="""></foo> While technically invalid, some websites (e.g. yahoo.com) contain HTML just like this. The lexer handles this as following: 1. When we're in the "element_head" machine, do business as usual until we bump into a "=". 2. Call (using Ragel's "fcall") the machine to use for processing the attribute value (if any). 3. In this machine quoted strings are processed. The moment a string has been processed the lexer jumps right back in to the "element_head" machine. This ensures that any stray quotes are ignored instead of being processed as extra attribute values (eventually leading to parsing errors due to unbalanced quotes). |
||
---|---|---|
.. | ||
oga | ||
support | ||
spec_helper.rb |