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

Turtle parser fails to parse float exponential notation #648

Closed
pduchesne opened this issue May 18, 2024 · 1 comment · Fixed by #649
Closed

Turtle parser fails to parse float exponential notation #648

pduchesne opened this issue May 18, 2024 · 1 comment · Fixed by #649

Comments

@pduchesne
Copy link
Contributor

While attempting to write and read in text/turtle, it appears that the parser fails to parse a string like

<http://example.org/a> <http://example.org/number> 1.1E0.

while it succeeds with a lower case e :

<http://example.org/a> <http://example.org/number> 1.1e0.

Most likely due to this line :

if ((val.indexOf("e") >= 0)) {

It must be noted that the serialize function does output an uppercase E, meaning rdflib.js can't read its own turtle output when involving float literals.

Tested with latest published version (2.2.35)

@pduchesne
Copy link
Contributor Author

The problem was in the regex, not the line suggested above. See PR.

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

Successfully merging a pull request may close this issue.

1 participant