Commit
+12 -1 +/-2 browse
1 | diff --git a/grammar.js b/grammar.js |
2 | index 7169e19..50c986a 100644 |
3 | --- a/grammar.js |
4 | +++ b/grammar.js |
5 | @@ -52,7 +52,8 @@ module.exports = grammar({ |
6 | iseq("@@", $.linerange, $.linerange, "@@", optional(ANYTHING)), |
7 | |
8 | addition: ($) => iseq("+", optional(ANYTHING)), |
9 | - deletion: ($) => iseq("-", optional(ANYTHING)), |
10 | + deletion: ($) => |
11 | + choice(iseq("-", optional(ANYTHING)), iseq("--", optional(ANYTHING))), |
12 | |
13 | context: ($) => token(prec(-1, ANYTHING)), |
14 | |
15 | diff --git a/test/corpus/text.txt b/test/corpus/text.txt |
16 | index 73cc93b..2f1f90a 100644 |
17 | --- a/test/corpus/text.txt |
18 | +++ b/test/corpus/text.txt |
19 | @@ -225,3 +225,13 @@ index 321c90a..b4a5cba 100644 |
20 | (addition) |
21 | (addition) |
22 | (addition)) |
23 | + |
24 | + ================================================================================ |
25 | + Double dash |
26 | + ================================================================================ |
27 | + --123 |
28 | + |
29 | + -------------------------------------------------------------------------------- |
30 | + |
31 | + (source |
32 | + (deletion)) |