kdl-org / kdl

the kdl document language specifications
https://kdl.dev
Other
1.1k stars 61 forks source link

Spec should not say "left-to-right", "rightmost", etc. #212

Closed CAD97 closed 2 years ago

CAD97 commented 2 years ago

...because not all UTF-8 text is left-to-right.

Consider:

node ‏!=1 !=2

That is, node \u{200F}!=1 !=2, where \u{200F} is RIGHT-TO-LEFT MARK.

(\u{200F} doesn't have property White_Space, so this isn't actually a duplicate property, but this illustrates the idea at least)

CAD97 commented 2 years ago

Also, as a really funny issue with specifying based on left versus right, is line continuations, where someone writes

node     !=1 \
     !=2

Which property should win in this case? I could argue very well that !=2 is "to the left of" !=1, and that !=1 is "to the right of" !=2.

zkat commented 2 years ago

I'm fine with this kind of thing being reworded to specify that we're talking about codepoints and their order in the bytestream of a document.