Commit
+13 -2 +/-2 browse
1 | diff --git a/grammar.js b/grammar.js |
2 | index 50c986a..6ec3106 100644 |
3 | --- a/grammar.js |
4 | +++ b/grammar.js |
5 | @@ -53,7 +53,12 @@ module.exports = grammar({ |
6 | |
7 | addition: ($) => iseq("+", optional(ANYTHING)), |
8 | deletion: ($) => |
9 | - choice(iseq("-", optional(ANYTHING)), iseq("--", optional(ANYTHING))), |
10 | + choice( |
11 | + iseq("-", optional(ANYTHING)), |
12 | + iseq("--", optional(ANYTHING)), |
13 | + iseq("---"), |
14 | + iseq("----", optional(ANYTHING)) |
15 | + ), |
16 | |
17 | context: ($) => token(prec(-1, ANYTHING)), |
18 | |
19 | diff --git a/test/corpus/text.txt b/test/corpus/text.txt |
20 | index 2f1f90a..ed5fe30 100644 |
21 | --- a/test/corpus/text.txt |
22 | +++ b/test/corpus/text.txt |
23 | @@ -227,11 +227,17 @@ index 321c90a..b4a5cba 100644 |
24 | (addition)) |
25 | |
26 | ================================================================================ |
27 | - Double dash |
28 | + Leading dash deletions |
29 | ================================================================================ |
30 | --123 |
31 | + --- |
32 | + ----1234 |
33 | + -----1234 |
34 | |
35 | -------------------------------------------------------------------------------- |
36 | |
37 | (source |
38 | + (deletion) |
39 | + (deletion) |
40 | + (deletion) |
41 | (deletion)) |