From: richard Date: Sun, 28 Oct 2001 23:22:28 +0000 (+0000) Subject: fixed bug #474749 ] Indentations lost X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=029a458ab427817cdb7d4e36b71768d48fc01f3e;p=roundup.git fixed bug #474749 ] Indentations lost git-svn-id: http://svn.roundup-tracker.org/svnroot/roundup/trunk@345 57a73879-2fb5-44c3-a270-3262357dd7e2 --- diff --git a/CHANGES.txt b/CHANGES.txt index 7036c9f..05af3c8 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -9,6 +9,7 @@ Fixed: . roundup-server now works on Windows, thanks Juergen Hermann. . Fixed install documentation, also thanks Juergen Hermann. . Fixed some URL issues in roundup.cgi, again thanks Juergen Hermann. + . bug #474749 ] indentations lost 2001-10-23 - 0.3.0 pre 3 Feature: @@ -44,6 +45,7 @@ Fixed: . bug #473126: Sender unknown . bug #473130: Nosy list not set correctly + 2001-10-11 - 0.3.0 pre 2 Fixed: . Hyperdatabase was inserting empty strings instead of None for missing diff --git a/MIGRATION.txt b/MIGRATION.txt index 251633d..15610ca 100644 --- a/MIGRATION.txt +++ b/MIGRATION.txt @@ -70,3 +70,10 @@ If you have modified your dbinit.py file, you may use encoded passwords: roundup-admin -i set user1 password= + +Configuration +------------- +FILTER_POSITION, ANONYMOUS_ACCESS, ANONYMOUS_REGISTER have been added to +the instance_config.py. Simplest solution is to copy the default values from +template in the core source. + diff --git a/roundup/mailgw.py b/roundup/mailgw.py index dee9330..76e2638 100644 --- a/roundup/mailgw.py +++ b/roundup/mailgw.py @@ -72,7 +72,7 @@ are calling the create() method to create a new node). If an auditor raises an exception, the original message is bounced back to the sender with the explanatory message given in the exception. -$Id: mailgw.py,v 1.24 2001-10-23 22:57:52 richard Exp $ +$Id: mailgw.py,v 1.25 2001-10-28 23:22:28 richard Exp $ ''' @@ -408,12 +408,21 @@ def parseContent(content, blank_line=re.compile(r'[\r\n]+\s*[\r\n]+'), character are considered "quoting sections". The first line of the first non-quoting section becomes the summary of the message. ''' - sections = blank_line.split(content) + # strip off leading carriage-returns / newlines + i = 0 + for i in range(len(content)): + if content[i] not in '\r\n': + break + if i > 0: + sections = blank_line.split(content[i:]) + else: + sections = blank_line.split(content) + # extract out the summary from the message summary = '' l = [] for section in sections: - section = section.strip() + #section = section.strip() if not section: continue lines = eol.split(section) @@ -432,6 +441,9 @@ def parseContent(content, blank_line=re.compile(r'[\r\n]+\s*[\r\n]+'), # # $Log: not supported by cvs2svn $ +# Revision 1.24 2001/10/23 22:57:52 richard +# Fix unread->chatting auto transition, thanks Roch'e +# # Revision 1.23 2001/10/21 04:00:20 richard # MailGW now moves 'unread' to 'chatting' on receiving e-mail for an issue. # diff --git a/test/test_mailsplit.py b/test/test_mailsplit.py index daec011..3dad533 100644 --- a/test/test_mailsplit.py +++ b/test/test_mailsplit.py @@ -15,7 +15,7 @@ # BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE, # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. # -# $Id: test_mailsplit.py,v 1.7 2001-10-23 00:57:32 richard Exp $ +# $Id: test_mailsplit.py,v 1.8 2001-10-28 23:22:28 richard Exp $ import unittest, cStringIO @@ -95,12 +95,25 @@ userfoo@foo.com self.assertEqual(summary, '') self.assertEqual(content, '') + def testIndentationSummary(self): + s = ' Four space indent.\n\n Four space indent.\nNo indent.' + summary, content = parseContent(s) + self.assertEqual(summary, ' Four space indent.') + + def testIndentationContent(self): + s = ' Four space indent.\n\n Four space indent.\nNo indent.' + summary, content = parseContent(s) + self.assertEqual(content, s) + def suite(): return unittest.makeSuite(MailsplitTestCase, 'test') # # $Log: not supported by cvs2svn $ +# Revision 1.7 2001/10/23 00:57:32 richard +# Removed debug print from mailsplit test. +# # Revision 1.6 2001/10/21 03:35:13 richard # bug #473125: Paragraph in e-mails #