Skip to content

Commit

Permalink
Merge pull request soutaro#1359 from soutaro/section
Browse files Browse the repository at this point in the history
Add anchor
  • Loading branch information
soutaro authored Nov 29, 2024
2 parents 9858186 + 631278d commit 577e677
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 577e677

Please sign in to comment.