Skip to content

Commit dc7e86b

Browse files
committed
Always clear the buffer when we reach an unknown call node
1 parent d497d21 commit dc7e86b

File tree

2 files changed

+17
-0
lines changed

2 files changed

+17
-0
lines changed

lib/phlex/compiler/method_compiler.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ def visit_call_node(node)
3939
end
4040
end
4141

42+
clear_buffer
4243
super
4344
end
4445

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
class OverrideElements < Phlex::HTML
2+
def view_template
3+
input(type: "email")
4+
5+
h1
6+
input(type: "email")
7+
div do
8+
input(type: "email")
9+
end
10+
end
11+
12+
def input(**)
13+
plain("not-an-input")
14+
# super(class: "form-control", **)
15+
end
16+
end

0 commit comments

Comments
 (0)