sipb-www
/
snippets
/
.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
550b7cd
)
TracZephyrPlugin: Snip quoted text in replies.
author
Anders Kaseorg
<andersk@mit.edu>
Tue, 8 Sep 2009 17:19:58 +0000
(13:19 -0400)
committer
Anders Kaseorg
<andersk@mit.edu>
Tue, 8 Sep 2009 17:19:58 +0000
(13:19 -0400)
Signed-off-by: Anders Kaseorg <andersk@mit.edu>
TracZephyrPlugin/ZephyrPlugin.py
patch
|
blob
|
history
diff --git
a/TracZephyrPlugin/ZephyrPlugin.py
b/TracZephyrPlugin/ZephyrPlugin.py
index 9792da4baae2927b69e7c5358823c28e4ac32f00..45584ae80bda02ead02c4e558a8a877b46eb34c2 100644
(file)
--- a/
TracZephyrPlugin/ZephyrPlugin.py
+++ b/
TracZephyrPlugin/ZephyrPlugin.py
@@
-3,6
+3,7
@@
from trac.core import *
from trac.ticket import ITicketChangeListener
import subprocess
+import re
import textwrap
import shlex
@@
-25,6
+26,7
@@
class ZephyrPlugin(Component):
p.wait()
def format_text(self, text):
+ text = re.sub(re.compile('^(?:> .*\n)+', re.MULTILINE), u'> […]\n', text)
lines = textwrap.fill(text).split('\n')
if len(lines) > 5:
lines = lines[:5] + [u'[…]']