- From: rzeno <ruset.zeno@gmail.com>
- Date: Mon, 18 Oct 2010 19:53:57 +0300
- To: cwm bugs list <public-cwm-bugs@w3.org>
- Message-ID: <20101018165357.GA31784@debian.sort-of.homelinux.org>
hi,
some times is better to sleep, :)
i apologise for first two wrong patches, i have a bad day.
diff -u notation3.py.orig notation3.py
inside cwm-1.2.1/swap/, where notation3.py.orig is the original notation3.py, ver 1.200,
give this patch( also as attachement):
--- notation3.py.orig 2010-10-18 03:48:29.000000000 +0300
+++ notation3.py 2010-10-18 19:33:05.000000000 +0300
@@ -1048,14 +1048,28 @@
ustr = u"" # Empty unicode string
startline = self.lines # Remember where for error messages
while j<len(str):
- i = j + len(delim)
- if str[j:i] == delim: # done.
- return i, ustr
-
if str[j] == '"':
- ustr = ustr + '"'
- j = j + 1
- continue
+ if delim == '"': # done when delim is "
+ i = j + 1
+ return i, ustr
+ if delim == '"""': # done when delim is """ and ...
+ if str[j:j+5] == '"""""': # ... we have "" before
+ i = j + 5
+ ustr = ustr + '""'
+ return i, ustr
+ if str[j:j+4] == '""""': # ... we have " before
+ i = j + 4
+ ustr = ustr + '"'
+ return i, ustr
+ if str[j:j+3] == '"""': # ... current " is part of delim
+ i = j + 3
+ return i, ustr
+
+ # we are inside of the string and current char is "
+ j = j + 1
+ ustr = ustr + '"'
+ continue
+
m = interesting.search(str, j) # was str[j:].
# Note for pos param to work, MUST be compiled ... re bug?
assert m , "Quote expected in string at ^ in %s^%s" %(
sorry again and best regards
Attachments
- text/x-diff attachment: notation3.py.patch
Received on Monday, 18 October 2010 16:54:35 UTC