summaryrefslogtreecommitdiffstats
path: root/Tools/scripts
diff options
context:
space:
mode:
authorRaymond Hettinger <python@rcn.com>2003-09-08 17:33:31 (GMT)
committerRaymond Hettinger <python@rcn.com>2003-09-08 17:33:31 (GMT)
commitb9c07af46c6761db7e938c8ef8f983ae9fa402a1 (patch)
tree000599d49d6833c2c9712d63ac9a60b8231d1a76 /Tools/scripts
parent7bbcde70d1c5e140e8ac6bc12506e0156f910d0e (diff)
downloadcpython-b9c07af46c6761db7e938c8ef8f983ae9fa402a1.zip
cpython-b9c07af46c6761db7e938c8ef8f983ae9fa402a1.tar.gz
cpython-b9c07af46c6761db7e938c8ef8f983ae9fa402a1.tar.bz2
Check for \NULL markup errors.
Diffstat (limited to 'Tools/scripts')
-rw-r--r--Tools/scripts/texcheck.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/Tools/scripts/texcheck.py b/Tools/scripts/texcheck.py
index 68be451..a2c8905 100644
--- a/Tools/scripts/texcheck.py
+++ b/Tools/scripts/texcheck.py
@@ -99,6 +99,7 @@ def checkit(source, opts, morecmds=[]):
delimiters = re.compile(r'\\(begin|end){([_a-zA-Z]+)}|([()\[\]])')
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
bracestack = [] # Stack of pending open braces
@@ -151,6 +152,10 @@ def checkit(source, opts, morecmds=[]):
if '\\' + cmd in validcmds:
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
nc = line.find(r'\newcommand')
if nc != -1: