Commit fe58a1a2 authored by Jonathan Blandford's avatar Jonathan Blandford
Browse files

fixed stupid <xref> problem

parent 0dafe883
......@@ -189,6 +189,9 @@ start_element(Context *context,
if (element && element->start_element_func)
(* element->start_element_func) (context, name, attrs);
if (!strcasecmp (name, "xref")) {
context->stack = g_list_remove_link (context->stack, context->stack);
}
}
static void
......
......@@ -232,7 +232,6 @@ sect_sect_start_element (Context *context,
SectContext *sect_context = (SectContext *)context->data;
g_return_if_fail (strlen (name) >= 5);
atrs_ptr = (gchar **) atrs;
while (atrs_ptr && *atrs_ptr) {
if (!strcasecmp (*atrs_ptr, "id")) {
......@@ -254,16 +253,26 @@ sect_sect_start_element (Context *context,
g_free (sect_context->previd);
}
context->sect1++;
context->sect2 = 0;
context->sect3 = 0;
context->sect4 = 0;
context->sect5 = 0;
break;
case '2':
context->sect2++;
context->sect3 = 0;
context->sect4 = 0;
context->sect5 = 0;
break;
case '3':
context->sect3++;
context->sect4 = 0;
context->sect5 = 0;
break;
case '4':
context->sect4++;
break;
context->sect5 = 0;
case '5':
context->sect4++;
break;
......
......@@ -76,15 +76,25 @@ toc_sect_start_element (Context *context,
switch (name[4]) {
case '1':
context->sect1++;
context->sect2 = 0;
context->sect3 = 0;
context->sect4 = 0;
context->sect5 = 0;
break;
case '2':
context->sect2++;
context->sect3 = 0;
context->sect4 = 0;
context->sect5 = 0;
break;
case '3':
context->sect3++;
context->sect4 = 0;
context->sect5 = 0;
break;
case '4':
context->sect4++;
context->sect5 = 0;
break;
case '5':
context->sect4++;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment