提交 0750e9fb 编写于 作者: J Justin Collins

No special Sexps for options/buffer calls in HAML

Brakeman was generating invalid call Sexps with `:_hamlout`
as the target for `_hamlout.options` and `hamlout.buffer`.
However, these special Sexps were not really be handled in Brakeman
anywhere, and there was no real reason to make special Sexps for them.
上级 6b3991dd
...@@ -29,14 +29,12 @@ class Brakeman::HamlTemplateProcessor < Brakeman::TemplateProcessor ...@@ -29,14 +29,12 @@ class Brakeman::HamlTemplateProcessor < Brakeman::TemplateProcessor
method = exp.method method = exp.method
if (call? target and target.method == :_hamlout) or target == :_hamlout if (call? target and target.method == :_hamlout)
res = case method res = case method
when :adjust_tabs, :rstrip!, :attributes #Check attributes, maybe? when :adjust_tabs, :rstrip!, :attributes #Check attributes, maybe?
ignore ignore
when :options when :options, :buffer
Sexp.new :call, :_hamlout, :options, exp.arglist exp
when :buffer
Sexp.new :call, :_hamlout, :buffer, exp.arglist
when :open_tag when :open_tag
Sexp.new(:tag, process(exp.arglist)) Sexp.new(:tag, process(exp.arglist))
else else
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册