Skip to content

Commit

Permalink
Add anchor
Browse files Browse the repository at this point in the history
  • Loading branch information
soutaro committed Nov 26, 2024
1 parent d14cde4 commit 631278d
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 1 deletion.
4 changes: 3 additions & 1 deletion bin/generate-diagnostics-docs.rb
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def visit_declaration_class(node)
# @rbs ...
def visit_member_method_definition(node)
if node.annotations.find { _1.string == "diagnostics--template" }
if node.comment
if node.comment
templates[node.name] = node.comment.string
end
end
Expand Down Expand Up @@ -61,6 +61,8 @@ def format_class(io)
classes.keys.sort.each do |key|
content = classes[key]

# io.puts "<h2 id='Ruby::#{key}'>Ruby::#{key}</h2>"
io.puts "<a name='Ruby::#{key}'></a>"
io.puts "## Ruby::#{key}"
io.puts
io.puts content
Expand Down
Loading

0 comments on commit 631278d

Please sign in to comment.