Temporarily remove list of flow charts from web version

This commit is contained in:
Hendrik Kleinwaechter
2023-08-20 11:58:16 +02:00
parent 91eae44547
commit 9611b250d2

View File

@@ -60,6 +60,7 @@ class ModifyBuild
text = fix_list_of_tables_figures_duplicates(text)
text = fix_menus_list_figures_tables(text) if is_list_figures_tables?(filename)
text = fix_list_of_figures_tables_display(text) if is_list_figures_tables?(filename)
text = remove_link_to_flowcharts(text)
File.open(filename, "w") {|file| file.puts text }
end
@@ -547,6 +548,17 @@ class ModifyBuild
text.gsub("https:/cdn.jsdelivr.net", "https://cdn.jsdelivr.net")
end
# The list of flowcharts contains no flowcharts in the HTML version. For
# this reason remove the link until we found a better solution
def remove_link_to_flowcharts(text)
doc = build_doc(text)
content = doc.css(".menu-items > .chapterToc").each do |el|
link = el.css("a")[0]
el.remove if link["href"] == "listflowchartname.html"
end
doc.to_html
end
def build_doc(text)
Nokogiri::HTML(text)
end