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
There are no special rules for whitespace. All whitespace characters are captured by the Character rule.
Considering the dog example. In the following fragment:
Conservation status [Domesticated]
Scientific classification [
Kingdom [Animalia]
...
The "Scientific classification" key, according to the rule is actually the string "\nScientific classification " (with a trailing space) and the key "Kingdom" is actually "\n Kingdom ", right?
And on Windows where the end of line is "\r\n", this document would have different key values...
Is it what you intended?
Shouldn't the specification clarify how leading and trailing whitespaces (including newlines) are to be interpreted?
Phil
The text was updated successfully, but these errors were encountered:
Indeed there are no rules for whitespace -- this is by design.
You point out a good reason why this might be the right choice: operating system differences.
Whitespace is the concern of one level above Jevko, which should ideally be occupied by standardized formats.
One such format, which does not have a spec yet, but is pretty much defined is codenamed Easy Jevko. Here are libraries for working with it in JS and Lua that I wrote (~ v0.1.0):
This format specifies how to interpret the different parts of Jevko into programming language data structures, such as tables/maps/objects, arrays/lists, and strings. This includes the treatment of whitespace in a sensible way: in your example Scientific classification and Kingdom would be keys in a map and they would be properly trimmed. Notice that this format does that automatically and disallows untrimmed keys entirely (which is a good thing in 99.9% of cases).
This should certainly be clarified somewhere. I'm not sure specification is the right place, but I'll figure something out.
I am not sure I understand the "whitespace rule":
Considering the
dog
example. In the following fragment:The "Scientific classification" key, according to the rule is actually the string
"\nScientific classification "
(with a trailing space) and the key "Kingdom" is actually"\n Kingdom "
, right?And on Windows where the end of line is
"\r\n"
, this document would have different key values...Is it what you intended?
Shouldn't the specification clarify how leading and trailing whitespaces (including newlines) are to be interpreted?
Phil
The text was updated successfully, but these errors were encountered: