Author: bugman
Date: Fri Feb 6 10:28:22 2015
New Revision: 27575
URL: http://svn.gna.org/viewcvs/relax?rev=27575&view=rev
Log:
Modified the rehead.py Epydoc API documentation <head> tag modifying script.
The Google analytics <script> tag inserted in later API documentation HTML
pages is now detected,
allowing these pages to be modified as well.
Modified:
website/api/rehead.py
Modified: website/api/rehead.py
URL:
http://svn.gna.org/viewcvs/relax/website/api/rehead.py?rev=27575&r1=27574&r2=27575&view=diff
==============================================================================
--- website/api/rehead.py (original)
+++ website/api/rehead.py Fri Feb 6 10:28:22 2015
@@ -128,6 +128,7 @@
in_head = False
index = 0
pre_modified = False
+ analytics = False
for line in self.file_lines:
# In the head tag.
if search("<head>", line):
@@ -139,8 +140,12 @@
if index == 2 and line[:-1] == "":
pre_modified = True
+ # Google analytics insertion.
+ if index == 4 and line[:-1] == " <!--Google analytics JS-->":
+ analytics = True
+
# Check the line, skipping the title tag.
- if not pre_modified and EXPECTED[index] != None and
EXPECTED[index] != line[:-1]:
+ if not pre_modified and not analytics and EXPECTED[index] !=
None and EXPECTED[index] != line[:-1]:
print("%s: Unexpected head tag encountered, quitting." %
file_name)
print(" Encountered line: \"%s\"" % line[:-1])
print(" Expected line: \"%s\"" % EXPECTED[index])
_______________________________________________
relax (http://www.nmr-relax.com)
This is the relax-commits mailing list
[email protected]
To unsubscribe from this list, get a password
reminder, or change your subscription options,
visit the list information page at
https://mail.gna.org/listinfo/relax-commits