From e5882320557a1ac8ed32e3cbbafba542fffe3657 Mon Sep 17 00:00:00 2001 From: John Mandereau Date: Mon, 29 Sep 2008 15:49:24 +0200 Subject: [PATCH] Docs postprocessing: do not strip .png suffixes Stripping .png suffixes is a source of confusion in content negociation, e.g. in Examples page where the user asks for a PNG file and he gets a MIDI file. --- buildscripts/postprocess_html.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/buildscripts/postprocess_html.py b/buildscripts/postprocess_html.py index dde215e565..d7bf892dea 100644 --- a/buildscripts/postprocess_html.py +++ b/buildscripts/postprocess_html.py @@ -196,7 +196,7 @@ def find_translations (prefix, lang_ext): online_links_re = re.compile ('''(href|src)=['"]\ ((?!Compiling-from-source.html")[^/][.]*[^.:'"]*)\ -([.]html|[.]png)(#[^"']*|)['"]''') +([.]html)(#[^"']*|)['"]''') offline_links_re = re.compile ('href=[\'"]\ ((?!Compiling-from-source.html")[^/][.]*[^.:\'"]*)([.]html)(#[^"\']*|)[\'"]') big_page_name_re = re.compile ('''(.+?)-big-page''') @@ -214,7 +214,7 @@ def process_i18n_big_page_links (match, prefix, lang_ext): def process_links (s, prefix, lang_ext, file_name, missing, target): page_flavors = {} if target == 'online': - # Strip .html, .png suffix for auto language selection (content + # Strip .html, suffix for auto language selection (content # negotiation). The menu must keep the full extension, so do # this before adding the menu. page_flavors[file_name] = \ -- 2.39.5