mirror of
https://github.com/hendricius/the-sourdough-framework
synced 2025-11-09 04:31:11 -06:00
Fix low level menu anchors removed
This fixes an issue with too many anchors being removed
This commit is contained in:
@@ -231,7 +231,7 @@ class ModifyBuild
|
|||||||
# this for the top level menu entries though.
|
# this for the top level menu entries though.
|
||||||
def fix_anchor_hyperlinks_menu(text)
|
def fix_anchor_hyperlinks_menu(text)
|
||||||
doc = build_doc(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|
|
top_level_menus.each do |el|
|
||||||
link = el.attribute("href").value
|
link = el.attribute("href").value
|
||||||
splitted = link.split("#")
|
splitted = link.split("#")
|
||||||
|
|||||||
Reference in New Issue
Block a user