This commit is contained in:
Gwenhael Le Moine 2021-11-09 23:14:42 +01:00
parent 0f56ebadbf
commit a395136d15
No known key found for this signature in database
GPG key ID: FDFE3669426707A7

View file

@ -22,6 +22,7 @@ module Rpn
# 1. regroup strings and programs
regrouped_input = []
splitted_input.each do |elt|
# TODO: handle buried-in-elt « and » (surround by ' ' and re-split)
if elt[0] == '«'
opened_programs += 1
elt.gsub!( '«', '« ') if elt.length > 1 && elt[1] != ' '