lib/humans_rb/parser.rb in humans_rb-0.0.3 vs lib/humans_rb/parser.rb in humans_rb-0.0.4
- old
+ new
@@ -16,10 +16,10 @@
rule(:heading) { slash_star >> space >> heading_name.as(:heading) >> space >> star_slash >> newline }
rule(:colon) { str(":") }
rule(:key) { slash_star.absent? >> newline.absent? >> match("[^:\n]").repeat.as(:key) >> colon }
rule(:value) { newline.absent? >> match("[^\n]").repeat.as(:value) }
- rule(:key_value_pair) { whitespace? >> key >> space >> value >> newline }
+ rule(:key_value_pair) { whitespace? >> key >> space? >> value >> newline }
rule(:key_value_pairs) { key_value_pair.repeat(1).as(:values) }
rule(:name) { slash_star.absent? >> match("[^\t\n:]").repeat(1).as(:name) >> newline }
rule(:team_member) { whitespace? >> name.maybe >> key_value_pair.repeat(1) >> newline? >> newline? }
rule(:team_members) { team_member.as(:member).repeat(2).as(:members) }