lib/ircp/parser/message_node_classes.rb in ircp-1.1.4 vs lib/ircp/parser/message_node_classes.rb in ircp-1.1.5
- old
+ new
@@ -51,10 +51,12 @@
end
end
class ParamsNode < Treetop::Runtime::SyntaxNode
def eval(env)
- env[:options] = env[:params] = [middle_values, trailing_value].flatten.compact
+ params = [middle_values, trailing_value].flatten.compact
+ params.last.gsub!(/\r\n$/, '') unless params.empty?
+ env[:options] = env[:params] = params
env
end
def middle_values
middles.elements.map { |e| e.v.text_value }