Created
September 25, 2017 18:13
-
-
Save softmoth/ab46fc0233d1981ec47d130c726a2224 to your computer and use it in GitHub Desktop.
YAMLish allow blank lines with less indentation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- a/lib/YAMLish.pm6 | |
+++ b/lib/YAMLish.pm6 | |
@@ -223,7 +223,7 @@ grammar Grammar { | |
<.comment>? <.line-break> | |
:my $new-indent; | |
<?before $indent $<sp>=' '+ { $new-indent = $indent ~ $<sp> }> | |
- [ $new-indent $<content>=[ \N* ] | $indent <.before <.line-break> > ]+ % <.line-break> | |
+ [ $new-indent $<content>=[ \N* ] | ' ' ** { 0 .. $indent.chars } <.before <.line-break> > ]+ % <.line-break> | |
} | |
token yes { |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment