On 16/02/2010 10:00, P.H. wrote:
> Hello,
>>> Could it be that the string resulting from a proc rule isn't split?
>> Definitely there is a problem here.
>> [...]
>> I have filled a report on the tracker:
>> http://code.google.com/p/txt2tags/issues/detail?id=25
>> Please feel free to add and comment on it,
> There isn't much to add to your report...
> Here is a quick and dirty (??) patch. No promise, but it seems to works
> for me and it doesn't seem to break anything.*
Reading the python regex documentation page, I came across the 
re.MULTILINE directive, which address exactly our problem I think. So a 
patch could also be this one-liner
=== modified file 'txt2tags'
--- txt2tags    2010-03-02 07:19:59 +0000
+++ txt2tags    2010-03-02 07:26:01 +0000
@@ -4347,7 +4347,7 @@
        if filters:
                for i in xrange(len(filters)):
                        patt,repl = filters[i]
-                       try: rgx = re.compile(patt)
+                       try: rgx = re.compile(patt,re.MULTILINE)
                        except: Error("%s: '%s'"%(errmsg, patt))
                        filters[i] = (rgx,repl)
        return filters

 > 38 tests from the test suite fail, but this is exactly like the
 > official svn version of txt2tags.  I haven't looked more into it...
You were lucky, I got quite the reverse
Totals: 160 tests (38 ok / 122 failed)
 > Is that important?
As it seems these errors are also standing for the official version, the 
only thing I can say is that Michel would probably have to start his SoC 
project by fixing the unit tests ;-)


Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
txt2tags-list mailing list

Reply via email to