quick-xml icon indicating copy to clipboard operation
quick-xml copied to clipboard

Split SyntaxError::UnclosedPIOrXmlDecl into 2 separate variants

Open SuchAFuriousDeath opened this issue 2 weeks ago • 2 comments

The SyntaxError enum does not currently differentiate between and unclosed processing instruction and an unclosed xml tag: https://github.com/tafia/quick-xml/blob/646ce4b866ee574f9f7e85de1496eea519ac2166/src/errors.rs#L22

I was trying to make some tests pass in Ruffle and it turns out that in order for the tests to pass, we need to differentiate between those 2 errors and throw different errors based on which one occured.

I was wondering whether it would be acceptable to split the SyntaxError::UnclosedPIOrXmlDecl variant into 2 separate variants. This would of course be a breaking change. I could do a PR if it is deemed acceptable.

SuchAFuriousDeath avatar Dec 10 '25 09:12 SuchAFuriousDeath

Yes, that is acceptable

Mingun avatar Dec 10 '25 18:12 Mingun

Ok, I will do a PR when I find the time, thanks for the quick answer.

SuchAFuriousDeath avatar Dec 10 '25 19:12 SuchAFuriousDeath