The startOffset in HardLineBreak is wrong in two cases:
a) if using backslash at the end of line, the startOffset does not include the backslash
example from ast_spec.md (line 7332):
foo\
bar
.
<p>foo<br />
bar</p>
.
Document[0, 9]
Paragraph[0, 9]
Text[0, 3] chars:[0, 3, "foo"]
HardLineBreak[4, 5]
Text[5, 8] chars:[5, 8, "bar"]
HardLineBreak starts at 4, but it should start at 3 where the backslash is.
b) if using more than two space characters at the end of a line, only the last two space characters are included in HardLineBreak, but it would IMO make more sense to include all trailing space characters in HardLineBreak
example from ast_spec.md (line 12564):
foo
baz
.
<p>foo<br />
baz</p>
.
Document[0, 15]
Paragraph[0, 15]
Text[0, 3] chars:[0, 3, "foo"]
HardLineBreak[8, 11]
Text[11, 14] chars:[11, 14, "baz"]
HardLineBreak starts at 8, but it should start at 3 where the first trailing space character is
The startOffset in
HardLineBreakis wrong in two cases:a) if using backslash at the end of line, the startOffset does not include the backslash
example from ast_spec.md (line 7332):
HardLineBreak starts at 4, but it should start at 3 where the backslash is.
b) if using more than two space characters at the end of a line, only the last two space characters are included in HardLineBreak, but it would IMO make more sense to include all trailing space characters in HardLineBreak
example from ast_spec.md (line 12564):
HardLineBreak starts at 8, but it should start at 3 where the first trailing space character is