You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Parsing the XML below with the code provided produces the following error. Adding a space before the closing > (<!DOCTYPE html >) makes it work. The doctype without the space is valid according to the HTML5 spec.
I'm fairly sure the issue is that the parser expects a space here.
file:/path/to/file.xml:2:15: whitespace expected<html xmlns="http://www.w3.org/1999/xhtml"> ^
file:/path/to/file.xml:2:15: document must contain exactly one element ^
java.lang.NullPointerException
at scala.xml.NodeSeq.toString(test.sc:151)
at A$A7$.print$$$Worksheet$$$Array$$$(test.sc:38)
at A$A7$.main(test.sc:27)
at A$A7.main(test.sc)
at #worksheet#.#worksheet#(test.sc)
Thanks for reporting this. Seems like it could be fixed easily enough. I worry we have enough test coverage for this code to avoid a regression. I'm also skeptical anyone uses this code to parse HTML, evidence of this bug. However, it is a sub-class of the ConstructingParser which likely has more popular usage.
Parsing the XML below with the code provided produces the following error. Adding a space before the closing
>
(<!DOCTYPE html >
) makes it work. The doctype without the space is valid according to the HTML5 spec.I'm fairly sure the issue is that the parser expects a space here.
The text was updated successfully, but these errors were encountered: