]> git.donarmstrong.com Git - lilypond.git/blobdiff - python/auxiliar/postprocess_html.py
Merge branch 'lilypond/translation' of ssh://jomand@git.sv.gnu.org/srv/git/lilypond
[lilypond.git] / python / auxiliar / postprocess_html.py
index 9e624e2de2c9398f1453a59f73ada7df69fe47fb..4e41b09803b2200d8b22492f168b96c10990dacb 100644 (file)
@@ -99,9 +99,9 @@ def build_pages_dict (filelist):
 def source_links_replace (m, source_val):
     return 'href="' + os.path.join (source_val, m.group (1)) + '"'
 
-splitted_docs_re = re.compile ('(Documentation/out-www/(notation|\
-music-glossary|application|general|learning|snippets))/')
-lily_snippets_re = re.compile ('(href|src)="(../lily-.*?|.*?[.]png)"')
+# More hardcoding, yay!
+splitted_docs_re = re.compile ('(Documentation/out-www/(automated-engraving|essay|notation|music-glossary|application|general|learning|snippets))/')
+lily_snippets_re = re.compile ('(href|src)="([0-9a-f]{2}/lily-.*?)"')
 pictures_re = re.compile ('src="(pictures/.*?)"')
 
 docindex_link_re = re.compile (r'href="index.html"')
@@ -160,10 +160,8 @@ def add_header (s, prefix):
             if not n:
                 s = header + s
 
-        s = header_tag + '\n' + s
-
         if doctype_re.search (s) == None:
-            s = doctype + s
+            s = doctype + header_tag + '\n' + s
 
         if css_re.search (s) == None:
             depth = (prefix.count ('/') - 1) * '../'