Commit
+3 -2 +/-2 browse
1 | diff --git a/grammar.js b/grammar.js |
2 | index bc9e124..1ecb116 100644 |
3 | --- a/grammar.js |
4 | +++ b/grammar.js |
5 | @@ -80,7 +80,7 @@ module.exports = grammar({ |
6 | |
7 | index: ($) => iseq("index", $.commit, "..", $.commit, optional($.mode)), |
8 | |
9 | - similarity: ($) => iseq("similarity", "index", field("score", /\d+/), "%"), |
10 | + similarity: ($) => iseq("similarity", "index", alias(/\d+/, $.score), "%"), |
11 | |
12 | old_file: ($) => iseq("---", $.filename), |
13 | new_file: ($) => iseq("+++", $.filename), |
14 | diff --git a/test/corpus/text.txt b/test/corpus/text.txt |
15 | index 2b82ef4..2f38814 100644 |
16 | --- a/test/corpus/text.txt |
17 | +++ b/test/corpus/text.txt |
18 | @@ -101,7 +101,8 @@ rename to tmp.md |
19 | (command |
20 | (argument) |
21 | (filename)) |
22 | - (similarity) |
23 | + (similarity |
24 | + (score)) |
25 | (file_change |
26 | (filename)) |
27 | (file_change |