From: Reinhold Kainhofer Date: Mon, 6 Oct 2008 22:57:05 +0000 (+0200) Subject: Docs: Also fix links to doc index in topdocs X-Git-Tag: release/2.11.62-1~17 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=9190e4e1b67d606759271a29478bfed8f15654a4;p=lilypond.git Docs: Also fix links to doc index in topdocs --- diff --git a/buildscripts/postprocess_html.py b/buildscripts/postprocess_html.py index 073e5c3ad2..e94da79755 100644 --- a/buildscripts/postprocess_html.py +++ b/buildscripts/postprocess_html.py @@ -115,16 +115,18 @@ 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 or 'Documentation/topdocs' 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) + + # we also need to replace in the lsr, which is already processed above! + if 'input/' in prefix or 'Documentation/topdocs' in prefix: + # fix the link from the regtest, lsr and topdoc pages to the doc index + # (rewrite prefix 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) - if 'Documentation/topdocs' in prefix: - targetfile = "index" + if 'input/regression' in prefix: + indexfile = "Documentation/devel" else: - targetfile = "Documentation/devel" - s = docindex_link_re.sub ('href="' + rel_link + targetfile + '.html\"', s) + indexfile = "index" + s = docindex_link_re.sub ('href="' + rel_link + indexfile + '.html\"', s) source_path = os.path.join (os.path.dirname (prefix), 'source') if not os.path.islink (source_path):