lib/roflbot/sentence.tt in roflbot-0.0.0 vs lib/roflbot/sentence.tt in roflbot-0.0.1

- old
+ new

@@ -10,15 +10,11 @@ rule token literal / variable end rule literal - (space / word / punctuation) { - def to_s(env = {}) - text_value - end - } + space / word / punctuation end rule variable "(" word ")" { def to_s(env = {}) @@ -27,16 +23,28 @@ end } end rule space - ' '+ + ' '+ { + def to_s(env = {}) + text_value + end + } end rule word - [a-zA-Z0-9]+ + [a-zA-Z0-9]+ { + def to_s(env = {}) + text_value + end + } end rule punctuation - [,.!?] + [,.!?] { + def to_s(env = {}) + text_value + end + } end end