[LrdeTools] 266: Perform the ERB instanciation before the yamlization.

https://svn.lrde.epita.fr/svn/lrdetools/trunk Index: ChangeLog from Nicolas Pouillard <ertai@lrde.epita.fr> Perform the ERB instanciation before the yamlization. * vcs/lib/vcs/form.rb: This fix a bug with complex `title' escaping. form.rb | 6 +++++- 1 files changed, 5 insertions(+), 1 deletion(-) Index: vcs/lib/vcs/form.rb --- vcs/lib/vcs/form.rb (revision 265) +++ vcs/lib/vcs/form.rb (working copy) @@ -34,7 +34,11 @@ b = getBinding(header.merge(:rev => rev)) input = ERB.new(input, nil, '<-%->', '$erbout_').result(b) LogEntry.open('w') { |f| f.print input } - puts ERB.new(header.to_yaml, nil, '<-%->', '$erbout_').result(b) + header.each_value do |v| + next unless v.is_a? String + v.replace(ERB.new(v, nil, '<-%->', '$erbout_').result(b)) + end + puts header.to_yaml end end IForm = ',iform'.to_path unless defined? Vcs::IForm
participants (1)
-
Nicolas Pouillard