File tree Expand file tree Collapse file tree 1 file changed +2
-4
lines changed
Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Original file line number Diff line number Diff line change @@ -47,8 +47,7 @@ def toc_generate(html)
4747 h2s . map . each do |h2 |
4848 inner_section += 1 ;
4949 anchor_id = anchor_prefix + toc_level . to_s + '-' + toc_section . to_s + '-' + inner_section . to_s
50- # Insert before element the anchor used by TOC
51- h2 . before ( "<a name=\" #{ anchor_id } \" ></a>" )
50+ h2 [ 'id' ] = "#{ anchor_id } "
5251
5352 level_html += create_level_html ( anchor_id ,
5453 toc_level + 1 ,
@@ -61,8 +60,7 @@ def toc_generate(html)
6160 level_html = '<ul>' + level_html + '</ul>' ;
6261 end
6362 anchor_id = anchor_prefix + toc_level . to_s + '-' + toc_section . to_s ;
64- # Insert before element the anchor used by TOC
65- h1 . before ( "<a name=\" #{ anchor_id } \" ></a>" )
63+ h1 [ 'id' ] = "#{ anchor_id } "
6664
6765 toc_html += create_level_html ( anchor_id ,
6866 toc_level ,
You can’t perform that action at this time.
0 commit comments