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
Often I get a "success!" in local build and then the PR build throws an error (usually about missing end tags for <li> or something similar) when parsing the HTML. This makes it so that I can't rely on the local build and have to do roundtrips with github to debug tiny HTML grammar errors... We should find a way to reflect these errors in local build.
The text was updated successfully, but these errors were encountered:
noamr
changed the title
Local build doesn't catch parsing errors
Local build doesn't catch HTML parsing errors
Feb 7, 2024
This fixes#290, by outputting the parse errors encountered by the Rust build step's parser. Previously they were being stored in the RcDom instance's errors vector, and ignored. Now they are threaded through to the final io::Result, and then output by main().
The hardest part of this was adding line numbers to the errors. Doing this necessitated creating a wrapper for RcDom, called RcDomWithLineNumbers, which implements TreeSink with two methods parse_error() and set_current_line() given custom behavior, while the other many methods just delegate to RcDom's implementation.
Additionally, this enables exact_errors as a parser option, which provides slightly more information in a couple of cases related to character references.
Often I get a "success!" in local build and then the PR build throws an error (usually about missing end tags for
<li>
or something similar) when parsing the HTML. This makes it so that I can't rely on the local build and have to do roundtrips with github to debug tiny HTML grammar errors... We should find a way to reflect these errors in local build.The text was updated successfully, but these errors were encountered: