summaryrefslogtreecommitdiff
path: root/program/steps/mail
diff options
context:
space:
mode:
authoralecpl <alec@alec.pl>2009-06-08 07:33:54 +0000
committeralecpl <alec@alec.pl>2009-06-08 07:33:54 +0000
commita54242c2b132855121615432d050aebda6526b93 (patch)
tree52d5407815ff76abacd98aa3a227a9d159c07609 /program/steps/mail
parent78ebe75bce66eecfe2d6a39c0735a6f7ea390247 (diff)
- Colorized signatures in plain text messages
Diffstat (limited to 'program/steps/mail')
-rw-r--r--program/steps/mail/func.inc9
1 files changed, 8 insertions, 1 deletions
diff --git a/program/steps/mail/func.inc b/program/steps/mail/func.inc
index 213b67e8e..661913810 100644
--- a/program/steps/mail/func.inc
+++ b/program/steps/mail/func.inc
@@ -819,7 +819,14 @@ function rcmail_print_body($part, $p = array())
// quote plain text
$body = Q(join("\n", $a_lines), 'replace', false);
- // ... colorize quoted lines
+ // colorize signature
+ if (($sp = strrpos($body, '-- ')) !== false)
+ if (($sp == 0 || $body[$sp-1] == "\n") && $body[$sp+3] == "\n") {
+ $body = substr($body, 0, max(0, $sp))
+ .'<span class="sig">'.substr($body, $sp).'</span>';
+ }
+
+ // colorize quoted lines
$a_lines = preg_split('/\n/', $body);
foreach ($q_lines as $i => $q)
if ($q['quote'])