summaryrefslogtreecommitdiff
path: root/Doc/Manual/fixstyle.py
diff options
context:
space:
mode:
Diffstat (limited to 'Doc/Manual/fixstyle.py')
-rw-r--r--Doc/Manual/fixstyle.py15
1 files changed, 10 insertions, 5 deletions
diff --git a/Doc/Manual/fixstyle.py b/Doc/Manual/fixstyle.py
index 1007d5949..a36096890 100644
--- a/Doc/Manual/fixstyle.py
+++ b/Doc/Manual/fixstyle.py
@@ -1,6 +1,6 @@
#!/usr/bin/python
-# Adds the SWIG stylesheet to the generated documentation on a single page
+# Replace the inline htmldoc stylesheet with the SWIG stylesheet
import sys
import string
@@ -14,11 +14,16 @@ swigstyle = "\n" + open("style.css").read()
lines = data.splitlines()
result = [ ]
+skip = False
for s in lines:
- if s == "<STYLE TYPE=\"text/css\"><!--":
- result.append(s + swigstyle)
- else:
- result.append(s)
+ if not skip:
+ result.append(s)
+ if s == "<STYLE TYPE=\"text/css\"><!--":
+ result.append(swigstyle)
+ skip = True
+ elif s == "--></STYLE>":
+ result.append(s)
+ skip = False
data = "\n".join(result)