summaryrefslogtreecommitdiff
blob: c264a67c0172056c6a7b333746bdfffdd40b378b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
From a8fd9ff8062152ccdcec7d63f2d5075f29ee2429 Mon Sep 17 00:00:00 2001
From: Ullrich Koethe <ullrich.koethe@iwr.uni-heidelberg.de>
Date: Wed, 21 Dec 2011 16:31:56 +0100
Subject: [PATCH] adapted regular expressions for doxygen 1.7.6.1

---
 docsrc/makeFunctionIndex.py | 4 ++--
 docsrc/post.py              | 6 +++---
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/docsrc/makeFunctionIndex.py b/docsrc/makeFunctionIndex.py
index 55e74bc..06300e2 100644
--- a/docsrc/makeFunctionIndex.py
+++ b/docsrc/makeFunctionIndex.py
@@ -119,8 +119,8 @@ def generateFunctionIndex(functionList):
     text = open(path + "/namespaces.html").read()
     if text.find('</h1>') > -1: # up to doxygen 1.7.1
         header = text[:text.find('</h1>')+5]
-    else: # for doxygen 1.7.4
-        header = text[:re.search(r'<div class="title">[^<]*</div>\s*</div>\s*</div>\n<div class="contents">',text).end()]
+    else: # for doxygen 1.7.4 to 1.7.6.1
+        header = text[:re.search(r'<div class="title">[^<]*</div>\s*</div>\s*</div>(?:<!--header-->)?\n<div class="contents">',text).end()]
     footer = re.search(r'(?s)(<!-- footer.html -->.*)', text).group(1)
 
     text = re.sub(r'Namespace List', r'Function Index', header)
diff --git a/docsrc/post.py b/docsrc/post.py
index a8836d5..fc51f8d 100644
--- a/docsrc/post.py
+++ b/docsrc/post.py
@@ -51,13 +51,13 @@
 </div>
 <div class="contents">''')
 
-# tested with doxygen 1.7.5.1
+# tested with doxygen 1.7.5.1 and 1.7.6.1
 mainHeading4 = re.compile(r'''(<!-- Generated by Doxygen .+ -->
 </div>)
 (<div class="header">
   <div class="headertitle">
 )<div class="title">(.*)</div>  </div>(.*)()
-</div>
+</div>(?:<!--header-->)?
 <div class="contents">''')
 
 mainHeadingReplacement = '''\\1
@@ -149,7 +149,7 @@ def processFile(fileName):
     f.close()
 
 files = glob.glob(path + '/*.html')  # use given path to files
-#files = glob.glob('../doc/vigra/index.html')
+#files = glob.glob(path + '/index.html')
 
 for file in files:
    processFile(file)
-- 
1.8.1.6