mirror of
https://github.com/hendricius/the-sourdough-framework
synced 2025-11-08 12:11:11 -06:00
Fix page display issue on list of tables/figures
This commit is contained in:
@@ -59,6 +59,7 @@ class ModifyBuild
|
||||
text = fix_js_dependency_link(text)
|
||||
text = fix_list_of_tables_figures_duplicates(text)
|
||||
text = fix_menus_list_figures_tables(text) if is_list_figures_tables?(text)
|
||||
text = fix_list_of_figures_tables_display(text) if is_list_figures_tables?(text)
|
||||
File.open(filename, "w") {|file| file.puts text }
|
||||
end
|
||||
|
||||
@@ -532,6 +533,14 @@ class ModifyBuild
|
||||
doc.to_html
|
||||
end
|
||||
|
||||
# For some reason the links are not properly displayed and have odd color.
|
||||
# This repairs the html and css.
|
||||
def fix_list_of_figures_tables_display(text)
|
||||
doc = build_doc(text)
|
||||
content = doc.css(".main-content .TOC").remove_class("TOC")
|
||||
doc.to_html
|
||||
end
|
||||
|
||||
# For some reason the depdency is missing a // in the url.
|
||||
def fix_js_dependency_link(text)
|
||||
text.gsub("https:/cdn.jsdelivr.net", "https://cdn.jsdelivr.net")
|
||||
|
||||
Reference in New Issue
Block a user