Closed solomon-b closed 2 years ago
There is a bug in span generation for functions at the moment:
> parser "{{ escapeUri \"foo\" }}" Right (EscapeURI (Span {start = AlexSourcePos {line = 0, col = 4}, end = AlexSourcePos {line = 0, col = 13}}) (StringTem (Span {start = AlexSourcePos {line = 0, col = 14}, end = AlexSourcePos {line = 0, col = 19}}) [String (Span {start = AlexSourcePos {line = 0, col = 15}, end = AlexSourcePos {line = 0, col = 18}}) "foo"]))
Notice how the EscapeURI span ends on column 13. It should include the contained StringTem.
EscapeURI
StringTem
This PR fixes the issue:
> parser "{{ escapeUri \"foo\" }}" Right (EscapeURI (Span {start = AlexSourcePos {line = 0, col = 4}, end = AlexSourcePos {line = 0, col = 19}}) (StringTem (Span {start = AlexSourcePos {line = 0, col = 14}, end = AlexSourcePos {line = 0, col = 19}}) [String (Span {start = AlexSourcePos {line = 0, col = 15}, end = AlexSourcePos {line = 0, col = 18}}) "foo"]))
There is a bug in span generation for functions at the moment:
Notice how the
EscapeURI
span ends on column 13. It should include the containedStringTem
.This PR fixes the issue: