Support for inline doctype rules plus newlines.
This adds support for lexing/parsing XML documents that use an IO as input _and_ contain doctype rules with newlines in them. This fixes #63.
This commit is contained in:
1 parent
f88df486ba
commit
cbb2815146
4 files changed
+74
-6
No files matched your search
@@ -86,12 +86,17 @@ rule
|
||||
}
|
||||
|
||||
# <!DOCTYPE html [ ... ]>
|
||||
| T_DOCTYPE_START T_DOCTYPE_NAME T_DOCTYPE_INLINE T_DOCTYPE_END
|
||||
| T_DOCTYPE_START T_DOCTYPE_NAME doctype_inline T_DOCTYPE_END
|
||||
{
|
||||
on_doctype(:name => val[1], :inline_rules => val[2])
|
||||
}
|
||||
;
|
||||
|
||||
doctype_inline
|
||||
: T_DOCTYPE_INLINE { val[0] }
|
||||
| doctype_inline T_DOCTYPE_INLINE { val[0] + val[1] }
|
||||
;
|
||||
|
||||
# CDATA tags
|
||||
|
||||
cdata
|
||||
|
||||
Reference in new issue
Block a user