forked from unisonweb/unison
-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix source locations in transcript parser
The source is initially parsed by CMark and then this code parses individual fenced code blocks. This sets the initial state for the code block parser so that source locations and error excerpts match the source file. __NB__: I think the “invalid-api-requests” transcript is intended to fail on the `DELETE`, not the unsupported `:error` tag, so I fixed that.
- Loading branch information
Showing
4 changed files
with
69 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
``` api:error | ||
``` api | ||
DELETE /something/important | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
Error parsing unison-src/transcripts/errors/invalid-api-requests.md: unison-src/transcripts/errors/invalid-api-requests.md:1:7: | ||
Error parsing unison-src/transcripts/errors/invalid-api-requests.md: unison-src/transcripts/errors/invalid-api-requests.md:2:4: | ||
| | ||
1 | DELETE /something/important | ||
| ^ | ||
2 | DELETE /something/important | ||
| ^ | ||
expecting end of input or spaces |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
Error parsing unison-src/transcripts/errors/no-abspath-in-ucm.md: unison-src/transcripts/errors/no-abspath-in-ucm.md:4:1: | ||
Error parsing unison-src/transcripts/errors/no-abspath-in-ucm.md: unison-src/transcripts/errors/no-abspath-in-ucm.md:4:3: | ||
| | ||
4 | <empty line> | ||
| ^ | ||
4 | .> ls | ||
| ^ | ||
expecting comment (delimited with “--”), end of input, or spaces |