Fix low level menu anchors removed

This fixes an issue with too many anchors being removed
This commit is contained in:
Hendrik Kleinwaechter
2023-07-14 14:01:48 +02:00
parent a4f16d7d90
commit 5203def7a7

View File

@@ -231,7 +231,7 @@ class ModifyBuild
# this for the top level menu entries though.
def fix_anchor_hyperlinks_menu(text)
doc = build_doc(text)
top_level_menus = doc.css(".menu-items > span > a")
top_level_menus = doc.css(".menu-items > span.chapterToc > a")
top_level_menus.each do |el|
link = el.attribute("href").value
splitted = link.split("#")