www-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

www/server/source/linc linc.py


From: Pavel Kharitonov
Subject: www/server/source/linc linc.py
Date: Mon, 18 Feb 2013 17:58:31 +0000

CVSROOT:        /web/www
Module name:    www
Changes by:     Pavel Kharitonov <ineiev>       13/02/18 17:58:31

Modified files:
        server/source/linc: linc.py 

Log message:
        Ignore commented out link to Translations README.

CVSWeb URLs:
http://web.cvs.savannah.gnu.org/viewcvs/www/server/source/linc/linc.py?cvsroot=www&r1=1.11&r2=1.12

Patches:
Index: linc.py
===================================================================
RCS file: /web/www/www/server/source/linc/linc.py,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -b -r1.11 -r1.12
--- linc.py     18 Feb 2013 15:29:50 -0000      1.11
+++ linc.py     18 Feb 2013 17:58:28 -0000      1.12
@@ -20,7 +20,7 @@
 
 # defines
 
-LINC_VERSION = 'LINC 0.7'
+LINC_VERSION = 'LINC 0.8'
 COPYRIGHT= \
 'Copyright (C) 2011-2012 Waclaw Jacek\n\
 Copyright (C) 2013 Free Software Foundation, Inc.\n\
@@ -100,6 +100,8 @@
 # Links like href="mailto:..."; and href="irc:..." are excluded.
 LINK_REGEXP = '<a(\s.+?)?\shref="(?P<link>[^"]+)"(\s.+?)?>'
 TRANSLATION_REGEXP = '\.(?P<langcode>[a-z]{2}|[a-z]{2}-[a-z]{2})\.[^.]+$'
+# Don't report against commented out link to README.translations.html
+LINK_TO_SKIP = '/server/standards/README.translations.html'
 
 VERBOSE = 0
 # libraries
@@ -623,9 +625,12 @@
        line_number = link_container['line_number']
        link = link_container['link']
        is_inside_comment = link_container['is_inside_comment']
-       if is_inside_comment == 'ssi':
+       if is_inside_comment == 'ssi' or link[0] == '#':
                continue
-       if link[0] == '#':
+       if link_container['is_inside_comment'] == 'yes' \
+               and link == LINK_TO_SKIP:
+               if VERBOSE > 2 :
+                       print 'Skipping link `' + LINK_TO_SKIP + "'"
                continue
 
        [link_type, link] = classify_link(filename, link)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]