Skip to content

Commit 189b4cd

Browse files
authored
Add support for void elements (#930)
2 parents 7b834b1 + 0a872f1 commit 189b4cd

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

lib/phlex/compiler/method_compiler.rb

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,17 @@ def visit_block_node(node)
114114
end
115115

116116
def compile_void_element(node, tag)
117+
[
118+
[
119+
buffer("<#{tag}"),
120+
*(
121+
if node.arguments
122+
visit_phlex_attributes(node.arguments)
123+
end
124+
),
125+
buffer(">"),
126+
],
127+
]
117128
end
118129

119130
private def ensure_new_line

0 commit comments

Comments
 (0)