Skip to content
Snippets Groups Projects
Commit 73a5ef03 authored by Yamagishi Kazutoshi's avatar Yamagishi Kazutoshi Committed by Eugen Rochko
Browse files

Respect original ID with ToC (#11895)

parent b9a8b388
No related branches found
No related tags found
No related merge requests found
......@@ -45,7 +45,7 @@ class TOCGenerator
parsed_html.traverse do |node|
next unless TARGET_ELEMENTS.include?(node.name)
anchor = node.text.parameterize
anchor = node['id'] || node.text.parameterize
@slugs[anchor] += 1
anchor = "#{anchor}-#{@slugs[anchor]}" if @slugs[anchor] > 1
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment