Open FrankFischer opened 1 year ago
If you parse the Djot string "ab" ... was what i wanted to say.
(the char at offset 2) - but this char does not exist!
Well it does: it's a \n
(newline) character.
I'm not really sure what is best. In fact, there are three ways we could go:
Since all the code currently implements 1, we'd need strong reasons to change from that.
If you parse the Djot string "a" the following events will be produced:
"+para" 'is' the first char of "ab" (same startpos and endpos as 'a')
"-para" 'is' the char after "ab" (the char at offset 2) - but this char does not exist!
Even if this 'works' in an implementation - a more concise and clearer concept should be considered:
As far as i know Java, JavaScript, Scala and many other programming languages use this concept.
In my opinion it this might be the better way in the long run.
Frank