Skip to content

Commit

Permalink
Support . as a row:column separator in terminal link detector
Browse files Browse the repository at this point in the history
The motivation here is the Sail language compiler which outputs errors conforming to the GNU style

https://www.gnu.org/prep/standards/html_node/Errors.html

I think they must be the only people in the world actually using the `line0.col0-line1.col1` format. I did have an attempt to capture the ending line/column but it is very difficult with regex, and not that useful anyway so I've opted for the simpler option of just ignoring the `-` part.
  • Loading branch information
Timmmm committed Aug 12, 2023
1 parent 2d9cc42 commit 86f4888
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -71,11 +71,14 @@ function generateLinkSuffixRegex(eolOnly: boolean) {
const lineAndColumnRegexClauses = [
// foo:339
// foo:339:12
// foo:339.12
// foo 339
// foo 339:12 [#140780]
// foo 339.12
// "foo",339
// "foo",339:12
`(?::| |['"],)${r()}(:${c()})?` + eolSuffix,
// "foo",339.12
`(?::| |['"],)${r()}([:.]${c()})?` + eolSuffix,
// The quotes below are optional [#171652]
// "foo", line 339 [#40468]
// "foo", line 339, col 12
Expand Down

0 comments on commit 86f4888

Please sign in to comment.