[Zope-Checkins] CVS: Zope2 - ST.py:1.12
chrism@serenade.digicool.com
chrism@serenade.digicool.com
Mon, 18 Jun 2001 20:01:13 -0400
Update of /cvs-repository/Zope2/lib/python/StructuredText
In directory serenade:/home/chrism/BackTalk/lib/python/StructuredText
Modified Files:
ST.py
Log Message:
The indention function returned a bogus number of spaces in front of the string it was passed, causing subparagraphs of a paragraph that were indented by less than two spaces to appear at the same indent level as their parent paragraph. This is now fixed, and paragraphs may be indented by a single space, just as they are in StructuredTextClassic.
--- Updated File ST.py in package Zope2 --
--- ST.py 2001/06/12 20:59:26 1.11
+++ ST.py 2001/06/19 00:01:12 1.12
@@ -11,9 +11,10 @@
Find the number of leading spaces. If none, return 0
"""
- if front(str):
- start,end = front(str).span()
- return end-start-1
+ result = front(str)
+ if result is not None:
+ start, end = result.span()
+ return end-start
else:
return 0 # no leading spaces