From bab6a313c0a7281f6775c5a63b718d12a6a331ca Mon Sep 17 00:00:00 2001 From: Pierre Pronchery Date: Mon, 13 Sep 2010 03:16:59 +0000 Subject: [PATCH] Now also handling strikethrough (as in , and ) --- src/ghtml-gtktextview.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/ghtml-gtktextview.c b/src/ghtml-gtktextview.c index eff989b..425cfba 100644 --- a/src/ghtml-gtktextview.c +++ b/src/ghtml-gtktextview.c @@ -58,7 +58,7 @@ typedef struct _GHtmlTag GtkTextTag * tag; } GHtmlTag; -#define GHTML_TAGS_COUNT 21 +#define GHTML_TAGS_COUNT 24 typedef struct _GHtml { Surfer * surfer; @@ -104,6 +104,13 @@ static const GHtmlProperty _ghtml_properties_b[] = { NULL, NULL } }; +static const GHtmlProperty _ghtml_properties_del[] = +{ + { "strikethrough", (void*)TRUE }, + { "strikethrough-set", (void*)TRUE }, + { NULL, NULL } +}; + /* XXX should use "scale" but gdouble values are not accepted this way */ static const GHtmlProperty _ghtml_properties_h1[] = { @@ -186,6 +193,7 @@ static const GHtmlTag _ghtml_tags[GHTML_TAGS_COUNT] = { { "a", GHTML_DISPLAY_INLINE, _ghtml_properties_a, NULL }, { "b", GHTML_DISPLAY_INLINE, _ghtml_properties_b, NULL }, + { "del", GHTML_DISPLAY_INLINE, _ghtml_properties_del, NULL }, { "div", GHTML_DISPLAY_BLOCK, NULL, NULL }, { "em", GHTML_DISPLAY_INLINE, _ghtml_properties_b, NULL }, { "form", GHTML_DISPLAY_BLOCK, NULL, NULL }, @@ -201,6 +209,8 @@ static const GHtmlTag _ghtml_tags[GHTML_TAGS_COUNT] = { "ol", GHTML_DISPLAY_BLOCK, NULL, NULL }, { "p", GHTML_DISPLAY_BLOCK, NULL, NULL }, { "pre", GHTML_DISPLAY_BLOCK,_ghtml_properties_pre, NULL }, + { "s", GHTML_DISPLAY_INLINE, _ghtml_properties_del, NULL }, + { "strike", GHTML_DISPLAY_INLINE,_ghtml_properties_del, NULL }, { "strong", GHTML_DISPLAY_INLINE,_ghtml_properties_b, NULL }, { "tt", GHTML_DISPLAY_INLINE, _ghtml_properties_tt, NULL }, { "u", GHTML_DISPLAY_INLINE, _ghtml_properties_u, NULL },