File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -31,13 +31,16 @@ def on_call_node_enter(node)
31
31
return unless :register_element == name
32
32
33
33
case arguments
34
- in [ Prism ::SymbolNode [ unescaped : String => element_name ] , *]
35
- @listener . add_method ( element_name , location , [
34
+ in [ Prism ::SymbolNode [ unescaped : String => method_name ] , *]
35
+ tag_name = method_name . tr ( "_" , "-" )
36
+ arguments [ 1 ] in Prism ::StringNode [ unescaped : String => tag_name ]
37
+
38
+ @listener . add_method ( method_name , location , [
36
39
RubyIndexer ::Entry ::Signature . new ( [
37
40
RubyIndexer ::Entry ::KeywordRestParameter . new ( name : :attributes ) ,
38
41
RubyIndexer ::Entry ::BlockParameter . new ( name : :content ) ,
39
42
] ) ,
40
- ] , visibility : :public )
43
+ ] , visibility : :public , comments : "Outputs a `< #{ tag_name } >` tag." )
41
44
end
42
45
end
43
46
end
You can’t perform that action at this time.
0 commit comments