From 92ad34bf8d384a2749944de0d4d72ef22649d24a Mon Sep 17 00:00:00 2001 From: konn Date: Tue, 22 Jul 2008 12:34:45 +0000 Subject: [PATCH] * Added dt tag with CSS for CHTML4.0 converter. git-svn-id: svn+ssh://svn.sourceforge.jp/svnroot/modchxj/mod_chxj/branches/sandbox@3049 1a406e8e-add9-4483-a2c8-d8cac5b7c224 --- src/chxj_chtml40.c | 21 +++++++++++++++++++-- test/chxj_chtml40/test_chxj_chtml40.c | 4 ++-- 2 files changed, 21 insertions(+), 4 deletions(-) diff --git a/src/chxj_chtml40.c b/src/chxj_chtml40.c index b7f8c5a0..9c9b5fee 100644 --- a/src/chxj_chtml40.c +++ b/src/chxj_chtml40.c @@ -3988,11 +3988,26 @@ s_chtml40_end_dl_tag(void *pdoc, Node *UNUSED(child)) * @return The conversion result is returned. */ static char * -s_chtml40_start_dt_tag(void *pdoc, Node *UNUSED(child)) +s_chtml40_start_dt_tag(void *pdoc, Node *node) { chtml40_t *chtml40 = GET_CHTML40(pdoc); Doc *doc = chtml40->doc; + Attr *attr; + char *attr_style = NULL; + + for (attr = qs_get_attr(doc,node); + attr; + attr = qs_get_next_attr(doc,attr)) { + char *nm = qs_get_attr_name(doc,attr); + char *val = qs_get_attr_value(doc,attr); + if (val && STRCASEEQ('s','S',"style", nm)) { + attr_style = val; + } + } W_L("
"); + if (IS_CSS_ON(chtml40->entryp)) { + s_chtml40_push_and_get_now_style(pdoc, node, attr_style); + } return chtml40->out; } @@ -4009,7 +4024,9 @@ static char * s_chtml40_end_dt_tag(void *pdoc, Node *UNUSED(child)) { chtml40_t *chtml40 = GET_CHTML40(pdoc); - + if (IS_CSS_ON(chtml40->entryp)) { + chxj_css_pop_prop_list(chtml40->css_prop_stack); + } return chtml40->out; } diff --git a/test/chxj_chtml40/test_chxj_chtml40.c b/test/chxj_chtml40/test_chxj_chtml40.c index 46df1550..4b7e761f 100644 --- a/test/chxj_chtml40/test_chxj_chtml40.c +++ b/test/chxj_chtml40/test_chxj_chtml40.c @@ -1682,7 +1682,7 @@ void test_chtml40_a_tag_href_attribute_003() void test_chtml40_a_tag_href_attribute_004() { #define TEST_STRING "abc" -#define RESULT_STRING "abc" +#define RESULT_STRING "abc" char *ret; char *tmp; device_table spec; @@ -1710,7 +1710,7 @@ void test_chtml40_a_tag_href_attribute_004() void test_chtml40_a_tag_href_attribute_005() { #define TEST_STRING "abc" -#define RESULT_STRING "abc" +#define RESULT_STRING "abc" char *ret; char *tmp; device_table spec; -- 2.11.0