[Commits] [SCM] claws branch, master, updated. 3.13.2-157-g18292e3
charles at claws-mail.org
charles at claws-mail.org
Mon Jun 27 16:37:34 CEST 2016
The branch, master has been updated
via 18292e3bbdb1c1cf3da8ad4c4a0edaa4f9c048c7 (commit)
via 8c8e1a90e794a019a9fe3f8c32255efa51583274 (commit)
via 145bcd5c6033be21c3e0f64a8343cbecced39134 (commit)
from 804af9b07981803eda6596ba6e62b8d05979d482 (commit)
Summary of changes:
src/html.c | 17 ++++++++++++++++-
src/html.h | 2 ++
src/plugins/vcalendar/vcal_manager.c | 2 +-
3 files changed, 19 insertions(+), 2 deletions(-)
- Log -----------------------------------------------------------------
commit 18292e3bbdb1c1cf3da8ad4c4a0edaa4f9c048c7
Author: Charles Lehner <charles at claws-mail.org>
Date: Mon Jun 27 10:28:41 2016 -0400
Handle ical lines longer than 256 bytes
diff --git a/src/plugins/vcalendar/vcal_manager.c b/src/plugins/vcalendar/vcal_manager.c
index 1f11f26..9c9c856 100644
--- a/src/plugins/vcalendar/vcal_manager.c
+++ b/src/plugins/vcalendar/vcal_manager.c
@@ -729,9 +729,9 @@ gchar *vcal_manager_icalevent_dump(icalcomponent *event, gchar *orga, icalcompon
/* encode to quoted-printable */
while (lines[i]) {
- gchar buf[256];
gint e_len = strlen(qpbody), n_len = 0;
gchar *outline = conv_codeset_strdup(lines[i], CS_UTF_8, conv_get_outgoing_charset_str());
+ gchar buf[strlen(outline)*8];
qp_encode_line(buf, (guchar *)outline);
n_len = strlen(buf);
commit 8c8e1a90e794a019a9fe3f8c32255efa51583274
Author: Charles Lehner <charles at claws-mail.org>
Date: Fri Jun 24 18:42:05 2016 -0400
Indent html in blockquotes
diff --git a/src/html.c b/src/html.c
index d09a4af..815f446 100644
--- a/src/html.c
+++ b/src/html.c
@@ -346,6 +346,7 @@ SC_HTMLParser *sc_html_parser_new(FILE *fp, CodeConverter *conv)
parser->empty_line = TRUE;
parser->space = FALSE;
parser->pre = FALSE;
+ parser->indent = 0;
#define SYMBOL_TABLE_ADD(table, list) \
{ \
@@ -488,6 +489,12 @@ static void sc_html_append_char(SC_HTMLParser *parser, gchar ch)
parser->newline = TRUE;
if (str->len > 1 && str->str[str->len - 2] == '\n')
parser->empty_line = TRUE;
+ if (parser->indent > 0) {
+ gint i, n = parser->indent;
+ for (i = 0; i < n; i++)
+ g_string_append_c(str, '>');
+ g_string_append_c(str, ' ');
+ }
} else
parser->newline = FALSE;
}
@@ -683,7 +690,8 @@ static SC_HTMLState sc_html_parse_tag(SC_HTMLParser *parser)
parser->space = FALSE;
sc_html_append_char(parser, '\n');
}
- sc_html_append_str(parser, HR_STR "\n", -1);
+ sc_html_append_str(parser, HR_STR, -1);
+ sc_html_append_char(parser, '\n');
parser->state = SC_HTML_HR;
} else if (!strcmp(tag->name, "div") ||
!strcmp(tag->name, "ul") ||
@@ -700,6 +708,12 @@ static SC_HTMLState sc_html_parse_tag(SC_HTMLParser *parser)
sc_html_append_str(parser, LI_STR, -1);
}
parser->state = SC_HTML_NORMAL;
+ } else if (!strcmp(tag->name, "blockquote")) {
+ parser->state = SC_HTML_NORMAL;
+ parser->indent++;
+ } else if (!strcmp(tag->name, "/blockquote")) {
+ parser->state = SC_HTML_NORMAL;
+ parser->indent--;
} else if (!strcmp(tag->name, "/table") ||
(tag->name[0] == '/' &&
tag->name[1] == 'h' &&
diff --git a/src/html.h b/src/html.h
index ad81f25..98e2f3a 100644
--- a/src/html.h
+++ b/src/html.h
@@ -67,6 +67,8 @@ struct _SC_HTMLParser
gboolean empty_line;
gboolean space;
gboolean pre;
+
+ gint indent;
};
struct _SC_HTMLAttr
commit 145bcd5c6033be21c3e0f64a8343cbecced39134
Author: Charles Lehner <charles at claws-mail.org>
Date: Tue Jun 14 12:52:54 2016 -0400
Line break after <dd>
diff --git a/src/html.c b/src/html.c
index b3acff0..d09a4af 100644
--- a/src/html.c
+++ b/src/html.c
@@ -689,6 +689,7 @@ static SC_HTMLState sc_html_parse_tag(SC_HTMLParser *parser)
!strcmp(tag->name, "ul") ||
!strcmp(tag->name, "li") ||
!strcmp(tag->name, "table") ||
+ !strcmp(tag->name, "dd") ||
!strcmp(tag->name, "tr") ||
(tag->name[0] == 'h' && g_ascii_isdigit(tag->name[1]))) {
if (!parser->newline) {
-----------------------------------------------------------------------
hooks/post-receive
--
Claws Mail
More information about the Commits
mailing list