aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2016-05-16 10:17:51 -0700
committerAlex Crichton <alex@alexcrichton.com>2016-05-16 10:17:51 -0700
commitb9280519cca836d109a7f669fc294b0cd19a57d7 (patch)
tree9add0f97e20f28f413105c48a038c03294dad4e5
parentc7770015987e915b08604dd41c2188c2f3f5b644 (diff)
downloadmilf-rs-b9280519cca836d109a7f669fc294b0cd19a57d7.tar.gz
milf-rs-b9280519cca836d109a7f669fc294b0cd19a57d7.zip
Fix accepting comments after table definitions
-rw-r--r--src/parser.rs5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/parser.rs b/src/parser.rs
index 265d7b5..8fa2d77 100644
--- a/src/parser.rs
+++ b/src/parser.rs
@@ -285,8 +285,7 @@ impl<'a> Parser<'a> {
};
if self.require_newline_after_table {
self.ws();
- self.comment();
- if !self.newline() {
+ if !self.comment() && !self.newline() {
self.errors.push(ParserError {
lo: start,
hi: start,
@@ -1196,7 +1195,7 @@ trimmed in raw strings.
[foo.bar]
#…
-[[foo]]
+[[foo]] # ...
#…
[foo.bar]
#...