Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Escape all instances of
"
in """
delimited literals
Fixes two bugs associated with `"""` delimited literals. First: such literals cannot end with a `"` (see `STRING_LITERAL_LONG_QUOTE` at https://www.w3.org/TR/turtle/#sec-grammar-grammar). Second: they cannot contain a sequence of three `"`. The prior `.gsub('"""', '\"""')` approach addresses this for cases where `"` appears in multiples of three, but fails for other cases (e.g. `""""`). Both bugs are fixed by escaping all `"` characters. An alternative addressing only the second bug might be: `.gsub('"""', '\""\"')`, which would ensure three quotes aren't ever left in a row. Closes #16.
- Loading branch information
Tom Johnson
committed
Feb 8, 2019
1 parent
b382c8e
commit 6c90d46
Showing
2 changed files
with
26 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters