[Python-checkins] python/dist/src/Tools/scripts texcheck.py, 1.8,
1.9
rhettinger at users.sourceforge.net
rhettinger at users.sourceforge.net
Mon Sep 8 12:41:20 EDT 2003
Update of /cvsroot/python/python/dist/src/Tools/scripts
In directory sc8-pr-cvs1:/tmp/cvs-serv3018
Modified Files:
texcheck.py
Log Message:
Generalize the last change to check for other markup spacing errors.
Index: texcheck.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Tools/scripts/texcheck.py,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** texcheck.py 8 Sep 2003 17:33:31 -0000 1.8
--- texcheck.py 8 Sep 2003 18:41:18 -0000 1.9
***************
*** 100,104 ****
braces = re.compile(r'({)|(})')
doubledwords = re.compile(r'(\b[A-za-z]+\b) \b\1\b')
! nullmarkup = re.compile(r'\NULL(?!\{\})')
openers = [] # Stack of pending open delimiters
--- 100,104 ----
braces = re.compile(r'({)|(})')
doubledwords = re.compile(r'(\b[A-za-z]+\b) \b\1\b')
! spacingmarkup = re.compile(r'\\(ABC|ASCII|C|Cpp|EOF|infinity|NULL|plusminus|POSIX|UNIX)\s')
openers = [] # Stack of pending open delimiters
***************
*** 153,159 ****
print 'Warning, forward slash used on line %d with cmd: /%s' % (lineno, cmd)
! # Check for bad markup
! if nullmarkup.search(line):
! print r'Warning, \NULL should be written as \NULL{} on line %d' % (lineno,)
# Validate commands
--- 153,159 ----
print 'Warning, forward slash used on line %d with cmd: /%s' % (lineno, cmd)
! # Check for markup requiring {} for correct spacing
! for cmd in spacingmarkup.findall(line):
! print r'Warning, \%s should be written as \%s{} on line %d' % (cmd, cmd, lineno)
# Validate commands
More information about the Python-checkins
mailing list