aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTeddy Wing2018-11-05 04:29:00 +0100
committerTeddy Wing2018-11-05 04:29:00 +0100
commitd608a23da62c9a93c01802997f1204fd494eb97d (patch)
treeb0bddd877626f0b0e66e0f94e7651a443b83c607
parent2495cd60c34061b4e2b383beee6947787388f4cf (diff)
downloaddome-key-map-d608a23da62c9a93c01802997f1204fd494eb97d.tar.bz2
map_group(): Fix error when mappings start with comment or whitespace
Previously we'd get an error if the first lines in the mappings file were blank or comments.
-rw-r--r--src/parser.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/parser.rs b/src/parser.rs
index 3f3d7b9..81f1573 100644
--- a/src/parser.rs
+++ b/src/parser.rs
@@ -630,10 +630,10 @@ where
I::Error: ParseError<I::Item, I::Range, I::Position>,
{
or(
- (
+ try((
blank(),
eof(),
- ).map(|_| MapGroup::default()),
+ )).map(|_| MapGroup::default()),
(
definitions(),
eof(),