aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/ical.peg10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/ical.peg b/src/ical.peg
index 5ce3800..771ea44 100644
--- a/src/ical.peg
+++ b/src/ical.peg
@@ -1,9 +1,15 @@
/*
* PEG.js grammar for iCal (http://tools.ietf.org/html/rfc5545).
- * Does not understand folds. They must be taken care of before
- * using the parser generated from this grammar.
*/
+{
+    var foldRe = /[\n][ \t]/g;
+    
+    while (foldRe.test(input)) {
+        input = input.replace(foldRe, '');
+    }
+}
+
start
= ContentLineList
/ "" { return []; }