class HamlLint::Tree::FilterNode
Represents a filter node which contains arbitrary code.
Public Instance Methods
filter_type()
click to toggle source
The type of code contained in this filter.
# File lib/haml_lint/tree/filter_node.rb, line 7 def filter_type @value[:name] end
text()
click to toggle source
# File lib/haml_lint/tree/filter_node.rb, line 11 def text # Seems HAML strips the starting blank lines... without them, line numbers become offset, # breaking the source_map and auto-correct nb_blank_lines = 0 nb_blank_lines += 1 while @document.source_lines[line + nb_blank_lines]&.empty? "#{"\n" * nb_blank_lines}#{super}" end