From: Jan Nieuwenhuizen Date: Thu, 23 Nov 2006 10:51:31 +0000 (+0100) Subject: Fix content negotiation stripping: keep # anchors in urls. X-Git-Tag: release/2.10.2-1~24 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=f33a857b539aaf8c9b04a99466990a62bbcaea4f;p=lilypond.git Fix content negotiation stripping: keep # anchors in urls. --- diff --git a/stepmake/bin/add-html-footer.py b/stepmake/bin/add-html-footer.py index dc6c537656..7d2b8fc961 100644 --- a/stepmake/bin/add-html-footer.py +++ b/stepmake/bin/add-html-footer.py @@ -309,9 +309,10 @@ def i18n (file_name, page): and os.path.exists (file_lang (file_name, x[0])), LANGUAGES) - # Strip .html, .png suffix for auto language selection. -# page = re.sub ('''(href|src)=[\'"]([^/][.]*[^.:\'"]*)(.html(#[^"]*)|.png)[\'"]''', -# '\\1="\\2"', page) + # Strip .html, .png suffix for auto language selection (content + # negotiation). + page = re.sub ('''(href|src)=[\'"]([^/][.]*[^.:\'"]*)(.html|.png)(#[^"\']*|)[\'"]''', + '\\1="\\2\\4"', page) # Create language menu. language_menu = ''