Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Added a command to harper-cli and the justfile that visually displays spans on a parsed file.
It can be painstaking to verify that a parser is working correctly when writing one, but this command makes it easier to verify that the correct spans are being chosen.
I created this to assist me in implementing the typst parser (#302), but am spinning it off into it's own PR since it is pretty distinct.
The output is rather cluttered because it prints the span numbers as well. I'm split on this one, it can be helpful because you can cross-reference with the output of
just parse
to check what each span corresponds to, but it also makes the output less readable (or at least a lot longer vertically).Example usage:

Note: it alternates colors to make adjacent spans stand out.