Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stop removing trailing whitespace from literals #7

Open
jamesaoverton opened this issue Apr 30, 2021 · 3 comments
Open

Stop removing trailing whitespace from literals #7

jamesaoverton opened this issue Apr 30, 2021 · 3 comments
Assignees

Comments

@jamesaoverton
Copy link
Member

I'm not sure where this is happening, but we shouldn't modify literals. I don't see where this could be happening in our Rust code. I hope it isn't happening in rio, but I guess we could fix that in our fork.

@jamesaoverton
Copy link
Member Author

I think the source of this is in trim_text here https://github.com/oxigraph/rio/blob/master/xml/src/parser.rs#L65

This is a setting for the underlying quick_xml: https://docs.rs/quick-xml/0.22.0/quick_xml/struct.Reader.html#method.trim_text

But when I turn off trim-text I get errors like this: https://github.com/oxigraph/rio/blob/master/xml/src/parser.rs#L661

I don't know how to handle them better.

@jamesaoverton
Copy link
Member Author

jamesaoverton commented May 25, 2021

@cmungall How bad do you think it would be to bite this bullet and insist that literals cannot have leading or trailing whitespace? In ROBOT report this is currently considered a warning: http://robot.obolibrary.org/report_queries/annotation_whitespace

@cmungall
Copy link
Contributor

I would say this is currently low priority but ultimately we need to preserve this, especially if we ever want to have a complete robot report replacement

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants