aboutsummaryrefslogtreecommitdiffstats
path: root/e-util/e-html-utils.c
diff options
context:
space:
mode:
authorDan Winship <danw@src.gnome.org>2001-09-07 03:47:46 +0800
committerDan Winship <danw@src.gnome.org>2001-09-07 03:47:46 +0800
commite14c6141596aac5b34250f0a994cfa4f73516fcc (patch)
tree4e69d87bc6e9cf5360782f6646200b660fdbb455 /e-util/e-html-utils.c
parentb5e4fe865ef94a8dd1988302fdbe61275a0d2f03 (diff)
downloadgsoc2013-evolution-e14c6141596aac5b34250f0a994cfa4f73516fcc.tar
gsoc2013-evolution-e14c6141596aac5b34250f0a994cfa4f73516fcc.tar.gz
gsoc2013-evolution-e14c6141596aac5b34250f0a994cfa4f73516fcc.tar.bz2
gsoc2013-evolution-e14c6141596aac5b34250f0a994cfa4f73516fcc.tar.lz
gsoc2013-evolution-e14c6141596aac5b34250f0a994cfa4f73516fcc.tar.xz
gsoc2013-evolution-e14c6141596aac5b34250f0a994cfa4f73516fcc.tar.zst
gsoc2013-evolution-e14c6141596aac5b34250f0a994cfa4f73516fcc.zip
Add E_TEXT_TO_HTML_CITE, to prepend "> " to each line.
* e-html-utils.c (e_text_to_html_full): Add E_TEXT_TO_HTML_CITE, to prepend "> " to each line. svn path=/trunk/; revision=12655
Diffstat (limited to 'e-util/e-html-utils.c')
-rw-r--r--e-util/e-html-utils.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/e-util/e-html-utils.c b/e-util/e-html-utils.c
index ac4e35c0f6..03c1c36117 100644
--- a/e-util/e-html-utils.c
+++ b/e-util/e-html-utils.c
@@ -197,6 +197,9 @@ is_citation (const unsigned char *c, gboolean saw_citation)
* citations (lines beginning with "> ", etc).
*
* - E_TEXT_TO_HTML_ESCAPE_8BIT: flatten everything to US-ASCII
+ *
+ * - E_TEXT_TO_HTML_CITE: quote the text with "> " at the start of each
+ * line.
**/
char *
e_text_to_html_full (const char *input, unsigned int flags, guint32 color)
@@ -213,7 +216,7 @@ e_text_to_html_full (const char *input, unsigned int flags, guint32 color)
out = buffer;
if (flags & E_TEXT_TO_HTML_PRE)
- out += sprintf (out, "<PRE>\n");
+ out += sprintf (out, "<PRE>");
col = 0;
@@ -243,6 +246,9 @@ e_text_to_html_full (const char *input, unsigned int flags, guint32 color)
/* Display mbox-mangled ">From" as "From" */
if (*cur == '>' && !saw_citation)
cur++;
+ } else if (flags & E_TEXT_TO_HTML_CITE && col == 0) {
+ check_size (&buffer, &buffer_size, out, 5);
+ out += sprintf (out, "&gt; ");
}
u = g_utf8_get_char (cur);