[Zope] "patch" to DocumentClass.py

Albert Ting Albert Ting <alt@sonic.net>
Mon, 15 Apr 2002 18:05:41 -0700


Current code treats numbers in it's own paragraph as a NumberedText.  This
is especially problematic when one is trying to insert numbers in a
StructuredTable.  There is probably a better way, but below is a simple
patch that seems to solve the problem.

*** DocumentClass.py    Mon Apr 15 18:04:59 2002
--- DocumentClass.py~   Sun Feb 10 11:32:44 2002
***************
*** 726,728 ****
!         expr = re.compile(r'(\s*[%s]\.)|(\s*[0-9]+\.)|(\s*[0-9]+\s+)' % letters).match,
!         check = re.compile(r'^\s*([0-9]+)(\.[0-9]+)?\s*$').match):
!
--- 726,727 ----
!         expr = re.compile(r'(\s*[%s]\.)|(\s*[0-9]+\.)|(\s*[0-9]+\s+)' % letters).match):
!
***************
*** 739,742 ****
-
-         if check(top):
-            return None
-
--- 737 ----