From 9e93cad31e97aabd1585fb3cdaa4624346576c81 Mon Sep 17 00:00:00 2001 From: Hendrik Kleinwaechter Date: Thu, 4 Jan 2024 09:31:55 +0100 Subject: [PATCH] Fixes https links (#323) --- website/modify_build.rb | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/website/modify_build.rb b/website/modify_build.rb index 497bb57..903b175 100644 --- a/website/modify_build.rb +++ b/website/modify_build.rb @@ -64,6 +64,7 @@ class ModifyBuild text = fix_js_dependency_link(text) text = fix_list_of_tables_figures_duplicates(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_list_of_figures_tables_display(text) if is_list_figures_tables?(filename) File.open(filename, "w:UTF-8") {|file| file.puts text } @@ -644,6 +645,12 @@ class ModifyBuild end doc.to_html 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 ModifyBuild.build