We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 12dfde9 commit e9f161cCopy full SHA for e9f161c
lib/syntax_tree/haml/format.rb
@@ -16,7 +16,7 @@ def initialize(
16
.lines
17
.each
18
.with_index(1) do |line, index|
19
- @literal_lines[index] = line.rstrip if line.start_with?("!")
+ @literal_lines[index] = line.strip if line.lstrip.start_with?("!")
20
end
21
22
super(source, *rest, options: options)
test/script_test.rb
@@ -22,4 +22,11 @@ def test_preserve_escape_html
def test_unescape
23
assert_format("!= hello")
24
25
+
26
+ def test_child_unescape
27
+ assert_format(<<~HAML)
28
+ .container
29
+ != hello
30
+ HAML
31
+ end
32
0 commit comments