* @return The conversion result is returned.
*/
static char *
-s_chtml30_start_h1_tag(void *pdoc, Node *UNUSED(node))
+s_chtml30_start_h1_tag(void *pdoc, Node *node)
{
chtml30_t *chtml30;
Doc *doc;
request_rec *r;
+ Attr *attr;
chtml30 = GET_CHTML30(pdoc);
doc = chtml30->doc;
r = doc->r;
- W_L("<h1>\r\n");
+ W_L("<h1");
+ for (attr = qs_get_attr(doc,node);
+ attr;
+ attr = qs_get_next_attr(doc,attr)) {
+ char* name;
+ char* value;
+ name = qs_get_attr_name(doc,attr);
+ value = qs_get_attr_value(doc,attr);
+ if (STRCASEEQ('a','A',"align", name)) {
+ if (value && (STRCASEEQ('l','L',"left",value) || STRCASEEQ('r','R',"right",value) || STRCASEEQ('c','C',"center",value))) {
+ W_L(" align=\"");
+ W_V(value);
+ W_L("\"");
+ break;
+ }
+ }
+ }
+ W_L(">");
return chtml30->out;
}
doc = chtml30->doc;
r = doc->r;
- W_L("</h1>\r\n");
+ W_L("</h1>");
return chtml30->out;
}
* @param node [i] The H2 tag node is specified.
* @return The conversion result is returned.
*/
-static char*
-s_chtml30_start_h2_tag(void* pdoc, Node* UNUSED(node))
+static char *
+s_chtml30_start_h2_tag(void *pdoc, Node *node)
{
- chtml30_t* chtml30;
- Doc* doc;
- request_rec* r;
+ chtml30_t *chtml30;
+ Doc *doc;
+ request_rec *r;
+ Attr *attr;
chtml30 = GET_CHTML30(pdoc);
doc = chtml30->doc;
r = doc->r;
- W_L("<h2>\r\n");
-
+ W_L("<h2");
+ for (attr = qs_get_attr(doc,node);
+ attr;
+ attr = qs_get_next_attr(doc,attr)) {
+ char* name;
+ char* value;
+ name = qs_get_attr_name(doc,attr);
+ value = qs_get_attr_value(doc,attr);
+ if (STRCASEEQ('a','A',"align", name)) {
+ if (value && (STRCASEEQ('l','L',"left",value) || STRCASEEQ('r','R',"right",value) || STRCASEEQ('c','C',"center",value))) {
+ W_L(" align=\"");
+ W_V(value);
+ W_L("\"");
+ break;
+ }
+ }
+ }
+ W_L(">");
return chtml30->out;
}
* @param node [i] The H2 tag node is specified.
* @return The conversion result is returned.
*/
-static char*
-s_chtml30_end_h2_tag(void* pdoc, Node* UNUSED(child))
+static char *
+s_chtml30_end_h2_tag(void *pdoc, Node *UNUSED(child))
{
- chtml30_t* chtml30;
- Doc* doc;
- request_rec* r;
+ chtml30_t *chtml30;
+ Doc *doc;
+ request_rec *r;
chtml30 = GET_CHTML30(pdoc);
doc = chtml30->doc;
r = doc->r;
- W_L("</h2>\r\n");
+ W_L("</h2>");
return chtml30->out;
}
* @param node [i] The H3 tag node is specified.
* @return The conversion result is returned.
*/
-static char*
-s_chtml30_start_h3_tag(void* pdoc, Node* UNUSED(node))
+static char *
+s_chtml30_start_h3_tag(void *pdoc, Node *node)
{
- chtml30_t* chtml30;
- Doc* doc;
- request_rec* r;
+ chtml30_t *chtml30;
+ Doc *doc;
+ request_rec *r;
+ Attr *attr;
chtml30 = GET_CHTML30(pdoc);
doc = chtml30->doc;
r = doc->r;
- W_L("<h3>\r\n");
+ W_L("<h3");
+ for (attr = qs_get_attr(doc,node);
+ attr;
+ attr = qs_get_next_attr(doc,attr)) {
+ char* name;
+ char* value;
+ name = qs_get_attr_name(doc,attr);
+ value = qs_get_attr_value(doc,attr);
+ if (STRCASEEQ('a','A',"align", name)) {
+ if (value && (STRCASEEQ('l','L',"left",value) || STRCASEEQ('r','R',"right",value) || STRCASEEQ('c','C',"center",value))) {
+ W_L(" align=\"");
+ W_V(value);
+ W_L("\"");
+ break;
+ }
+ }
+ }
+ W_L(">");
return chtml30->out;
}
* @param node [i] The H3 tag node is specified.
* @return The conversion result is returned.
*/
-static char*
-s_chtml30_end_h3_tag(void* pdoc, Node* UNUSED(child))
+static char *
+s_chtml30_end_h3_tag(void *pdoc, Node *UNUSED(child))
{
- chtml30_t* chtml30;
- Doc* doc;
- request_rec* r;
+ chtml30_t *chtml30;
+ Doc *doc;
+ request_rec *r;
chtml30 = GET_CHTML30(pdoc);
doc = chtml30->doc;
r = doc->r;
- W_L("</h3>\r\n");
+ W_L("</h3>");
return chtml30->out;
}
* @param node [i] The H4 tag node is specified.
* @return The conversion result is returned.
*/
-static char*
-s_chtml30_start_h4_tag(void* pdoc, Node* UNUSED(node))
+static char *
+s_chtml30_start_h4_tag(void *pdoc, Node *node)
{
- chtml30_t* chtml30;
- Doc* doc;
- request_rec* r;
+ chtml30_t *chtml30;
+ Doc *doc;
+ request_rec *r;
+ Attr *attr;
chtml30 = GET_CHTML30(pdoc);
doc = chtml30->doc;
r = doc->r;
- W_L("<h4>\r\n");
-
+ W_L("<h4");
+ for (attr = qs_get_attr(doc,node);
+ attr;
+ attr = qs_get_next_attr(doc,attr)) {
+ char* name;
+ char* value;
+ name = qs_get_attr_name(doc,attr);
+ value = qs_get_attr_value(doc,attr);
+ if (STRCASEEQ('a','A',"align", name)) {
+ if (value && (STRCASEEQ('l','L',"left",value) || STRCASEEQ('r','R',"right",value) || STRCASEEQ('c','C',"center",value))) {
+ W_L(" align=\"");
+ W_V(value);
+ W_L("\"");
+ break;
+ }
+ }
+ }
+ W_L(">");
return chtml30->out;
}
* @param node [i] The H4 tag node is specified.
* @return The conversion result is returned.
*/
-static char*
-s_chtml30_end_h4_tag(void* pdoc, Node* UNUSED(child))
+static char *
+s_chtml30_end_h4_tag(void *pdoc, Node *UNUSED(child))
{
- chtml30_t* chtml30;
- Doc* doc;
- request_rec* r;
+ chtml30_t *chtml30;
+ Doc *doc;
+ request_rec *r;
chtml30 = GET_CHTML30(pdoc);
doc = chtml30->doc;
r = doc->r;
- W_L("</h4>\r\n");
+ W_L("</h4>");
return chtml30->out;
}
* @param node [i] The H5 tag node is specified.
* @return The conversion result is returned.
*/
-static char*
-s_chtml30_start_h5_tag(void* pdoc, Node* UNUSED(node))
+static char *
+s_chtml30_start_h5_tag(void *pdoc, Node *node)
{
- chtml30_t* chtml30;
- Doc* doc;
- request_rec* r;
+ chtml30_t *chtml30;
+ Doc *doc;
+ request_rec *r;
+ Attr *attr;
chtml30 = GET_CHTML30(pdoc);
doc = chtml30->doc;
r = doc->r;
- W_L("<h5>\r\n");
-
+ W_L("<h5");
+ for (attr = qs_get_attr(doc,node);
+ attr;
+ attr = qs_get_next_attr(doc,attr)) {
+ char *name;
+ char *value;
+ name = qs_get_attr_name(doc,attr);
+ value = qs_get_attr_value(doc,attr);
+ if (STRCASEEQ('a','A',"align", name)) {
+ if (value && (STRCASEEQ('l','L',"left",value) || STRCASEEQ('r','R',"right",value) || STRCASEEQ('c','C',"center",value))) {
+ W_L(" align=\"");
+ W_V(value);
+ W_L("\"");
+ break;
+ }
+ }
+ }
+ W_L(">");
return chtml30->out;
}
doc = chtml30->doc;
r = doc->r;
- W_L("</h5>\r\n");
+ W_L("</h5>");
return chtml30->out;
}
* @param node [i] The H6 tag node is specified.
* @return The conversion result is returned.
*/
-static char*
-s_chtml30_start_h6_tag(void* pdoc, Node* UNUSED(node))
+static char *
+s_chtml30_start_h6_tag(void *pdoc, Node *node)
{
- chtml30_t* chtml30;
- Doc* doc;
- request_rec* r;
+ chtml30_t *chtml30;
+ Doc *doc;
+ request_rec *r;
+ Attr *attr;
chtml30 = GET_CHTML30(pdoc);
doc = chtml30->doc;
r = doc->r;
- W_L("<h6>\r\n");
-
+ W_L("<h6");
+ for (attr = qs_get_attr(doc,node);
+ attr;
+ attr = qs_get_next_attr(doc,attr)) {
+ char *name;
+ char *value;
+ name = qs_get_attr_name(doc,attr);
+ value = qs_get_attr_value(doc,attr);
+ if (STRCASEEQ('a','A',"align", name)) {
+ if (value && (STRCASEEQ('l','L',"left",value) || STRCASEEQ('r','R',"right",value) || STRCASEEQ('c','C',"center",value))) {
+ W_L(" align=\"");
+ W_V(value);
+ W_L("\"");
+ break;
+ }
+ }
+ }
+ W_L(">");
return chtml30->out;
}
doc = chtml30->doc;
r = doc->r;
- W_L("</h6>\r\n");
+ W_L("</h6>");
return chtml30->out;
}