Skip to content

Commit

Permalink
Fix anchor if it contains two or more slashes
Browse files Browse the repository at this point in the history
  • Loading branch information
ksss committed Jun 14, 2024
1 parent 5974179 commit 7092e64
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/rubocop/cops_documentation_generator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@ def table_of_content_for_department(department)
filename = "#{department_to_basename(department)}.adoc"
content = +"=== Department xref:#{filename}[#{type_title}]\n\n"
cops_of_department(department).each do |cop|
anchor = cop.cop_name.sub('/', '').downcase
anchor = cop.cop_name.delete('/').downcase
content << "* xref:#{filename}##{anchor}[#{cop.cop_name}]\n"
end

Expand Down

0 comments on commit 7092e64

Please sign in to comment.