Class: BetterHtml::TestHelper::SafeErb::NoStatements
- Defined in:
- lib/better_html/test_helper/safe_erb/no_statements.rb
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
Methods inherited from Base
Constructor Details
This class inherits a constructor from BetterHtml::TestHelper::SafeErb::Base
Instance Method Details
#validate ⇒ Object
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/better_html/test_helper/safe_erb/no_statements.rb', line 9 def validate .each do |tag, content_node| no_statements(content_node) unless content_node.present? && tag.attributes["type"]&.value == "text/html" end if @parser.template_language == :javascript @parser.nodes_with_type(:text).each do |node| no_statements(node) end end @parser.nodes_with_type(:cdata, :comment).each do |node| no_statements(node) end end |