static char* s_jhtml_end_body_tag (jhtml_t* jhtml, Node* node);
static char* s_jhtml_start_a_tag (jhtml_t* jhtml, Node* node);
static char* s_jhtml_end_a_tag (jhtml_t* jhtml, Node* node);
+static char* s_jhtml_start_pre_tag (jhtml_t* jhtml, Node* node);
+static char* s_jhtml_end_pre_tag (jhtml_t* jhtml, Node* node);
+static char* s_jhtml_start_p_tag (jhtml_t* jhtml, Node* node);
+static char* s_jhtml_end_p_tag (jhtml_t* jhtml, Node* node);
static char* s_jhtml_start_ul_tag (jhtml_t* jhtml, Node* node);
static char* s_jhtml_end_ul_tag (jhtml_t* jhtml, Node* node);
static char* s_jhtml_start_ol_tag (jhtml_t* jhtml, Node* node);
char* name = qs_get_node_name(doc,child);
/*------------------------------------------------------------------------*/
+ /* <PRE> (for TEST) */
+ /*------------------------------------------------------------------------*/
+ if ((*name == 'p' || *name == 'P') && strcasecmp(name, "pre") == 0) {
+ s_jhtml_start_pre_tag (jhtml, child);
+ s_jhtml_node_exchange (jhtml, child, indent+1);
+ s_jhtml_end_pre_tag (jhtml, child);
+ }
+ else
+ /*------------------------------------------------------------------------*/
+ /* <P> (for TEST) */
+ /*------------------------------------------------------------------------*/
+ if ((*name == 'p' || *name == 'P') && strcasecmp(name, "p") == 0) {
+ s_jhtml_start_p_tag (jhtml, child);
+ s_jhtml_node_exchange (jhtml, child, indent+1);
+ s_jhtml_end_p_tag (jhtml, child);
+ }
+ else
+ /*------------------------------------------------------------------------*/
/* <UL> (for TEST) */
/*------------------------------------------------------------------------*/
if ((*name == 'u' || *name == 'U') && strcasecmp(name, "ul") == 0) {
ii++;
}
else
- if (textval[ii] != '\r' && textval[ii] != '\n') {
+ if (jhtml->pre_flag) {
one_byte[0] = textval[ii+0];
tdst = qs_out_apr_pstrcat(r, tdst, one_byte, &tdst_len);
}
+ else {
+ if (textval[ii] != '\r' && textval[ii] != '\n') {
+ one_byte[0] = textval[ii+0];
+ tdst = qs_out_apr_pstrcat(r, tdst, one_byte, &tdst_len);
+ }
+ }
}
jhtml->out = apr_pstrcat(r->pool, jhtml->out, tdst, NULL);
}
}
/**
+ * It is a handler who processes the P tag.
+ *
+ * @param jhtml [i/o] The pointer to the CHTML structure at the output
+ * destination is specified.
+ * @param node [i] The P tag node is specified.
+ * @return The conversion result is returned.
+ */
+static char*
+s_jhtml_start_p_tag(jhtml_t* jhtml, Node* node)
+{
+ Doc* doc = jhtml->doc;
+ request_rec* r = doc->r;
+
+ jhtml->out = apr_pstrcat(r->pool, jhtml->out, "<p>", NULL);
+
+ return jhtml->out;
+}
+
+/**
+ * It is a handler who processes the P tag.
+ *
+ * @param jhtml [i/o] The pointer to the CHTML structure at the output
+ * destination is specified.
+ * @param node [i] The P tag node is specified.
+ * @return The conversion result is returned.
+ */
+static char*
+s_jhtml_end_p_tag(jhtml_t* jhtml, Node* child)
+{
+ Doc* doc = jhtml->doc;
+ request_rec* r = doc->r;
+
+ jhtml->out = apr_pstrcat(r->pool, jhtml->out, "</p>", NULL);
+
+ return jhtml->out;
+}
+
+/**
+ * It is a handler who processes the PRE tag.
+ *
+ * @param jhtml [i/o] The pointer to the CHTML structure at the output
+ * destination is specified.
+ * @param node [i] The PRE tag node is specified.
+ * @return The conversion result is returned.
+ */
+static char*
+s_jhtml_start_pre_tag(jhtml_t* jhtml, Node* node)
+{
+ Doc* doc = jhtml->doc;
+ request_rec* r = doc->r;
+
+ jhtml->pre_flag++;
+ jhtml->out = apr_pstrcat(r->pool, jhtml->out, "<pre>", NULL);
+
+ return jhtml->out;
+}
+
+/**
+ * It is a handler who processes the PRE tag.
+ *
+ * @param jhtml [i/o] The pointer to the CHTML structure at the output
+ * destination is specified.
+ * @param node [i] The PRE tag node is specified.
+ * @return The conversion result is returned.
+ */
+static char*
+s_jhtml_end_pre_tag(jhtml_t* jhtml, Node* child)
+{
+ Doc* doc = jhtml->doc;
+ request_rec* r = doc->r;
+
+ jhtml->out = apr_pstrcat(r->pool, jhtml->out, "</pre>", NULL);
+ jhtml->pre_flag--;
+
+ return jhtml->out;
+}
+
+/**
* It is a handler who processes the UL tag.
*
* @param jhtml [i/o] The pointer to the CHTML structure at the output