mirror of
https://github.com/hendricius/the-sourdough-framework
synced 2025-11-14 23:21:11 -06:00
Fixes https links (#323)
This commit is contained in:
committed by
GitHub
parent
4572a8b17b
commit
9e93cad31e
@@ -64,6 +64,7 @@ class ModifyBuild
|
|||||||
text = fix_js_dependency_link(text)
|
text = fix_js_dependency_link(text)
|
||||||
text = fix_list_of_tables_figures_duplicates(text)
|
text = fix_list_of_tables_figures_duplicates(text)
|
||||||
text = add_anchors_to_headers(text)
|
text = add_anchors_to_headers(text)
|
||||||
|
text = fix_https_links(text)
|
||||||
text = fix_menus_list_figures_tables(text) if is_list_figures_tables?(filename)
|
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 = fix_list_of_figures_tables_display(text) if is_list_figures_tables?(filename)
|
||||||
File.open(filename, "w:UTF-8") {|file| file.puts text }
|
File.open(filename, "w:UTF-8") {|file| file.puts text }
|
||||||
@@ -644,6 +645,12 @@ class ModifyBuild
|
|||||||
end
|
end
|
||||||
doc.to_html
|
doc.to_html
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# For some reason some of the links are broken in the conversion process.
|
||||||
|
# They have https:/www and are missing a slash.
|
||||||
|
def fix_https_links(text)
|
||||||
|
text.gsub("https:/www", "https://www")
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
ModifyBuild.build
|
ModifyBuild.build
|
||||||
|
|||||||
Reference in New Issue
Block a user