From: Reinhold Kainhofer Date: Mon, 6 Oct 2008 22:00:47 +0000 (+0200) Subject: buildscripts: Fix links to the doc index in the regtest pages X-Git-Tag: release/2.11.62-1~22 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=ed28bd94bafe4c2151605261208f51a28a3bcff7;p=lilypond.git buildscripts: Fix links to the doc index in the regtest pages --- diff --git a/buildscripts/postprocess_html.py b/buildscripts/postprocess_html.py index a3302c98e4..8a569240fe 100644 --- a/buildscripts/postprocess_html.py +++ b/buildscripts/postprocess_html.py @@ -99,6 +99,9 @@ snippets_ref_re = re.compile (r'href="(\.\./)?lilypond-snippets') user_ref_re = re.compile ('href="(?:\.\./)?lilypond\ (-internals|-learning|-program|(?!-snippets))') +docindex_link_re = re.compile (r'href="index.html"') + + ## Windows does not support symlinks. # This function avoids creating symlinks for splitted HTML manuals # Get rid of symlinks in GNUmakefile.in (local-WWW-post) @@ -112,6 +115,12 @@ def hack_urls (s, prefix): s = snippets_ref_re.sub ('href="source/input/lsr/lilypond-snippets', s) elif 'input/lsr' in prefix: s = user_ref_re.sub ('href="source/Documentation/user/lilypond\\1', s) + elif 'input/regression' in prefix: + # fix the link from the regtest pages to the doc index (rewrite the prefix + # name to obtain the relative path of the doc index page) + rel_link = re.sub (r'out-www/.*$', '', prefix) + rel_link = re.sub (r'[^/]*/', '../', rel_link) + s = docindex_link_re.sub ('href="' + rel_link + 'Documentation/devel.html\"', s) source_path = os.path.join (os.path.dirname (prefix), 'source') if not os.path.islink (source_path):