2006-10-17 Miguel de Icaza <miguel@novell.com>
+ * src/gmarkup.c (g_markup_parse_context_parse): Accept dots in the
+ sequence, reset the state after a closing element.
+
* src/garray.c (g_array_insert_vals): Shift the elements the
correct amount.
for (p = text; p < end; p++){
char c = *p;
-
+
switch (context->state){
case START:
if (c == ' ' || c == '\t' || c == '\f' || c == '\n')
goto fail;
}
- for (++p; p < end && isalnum (*p); p++)
+ for (++p; p < end && (isalnum (*p) || (*p == '.')); p++)
;
if (p == end){
set_error ("Expected an element");
}
}
free (ename);
- } else
+ } else {
context->level = g_slist_prepend (context->level, ename);
+ }
context->state = TEXT;
break;
goto fail;
}
text = current->data;
-
if (context->parser.end_element != NULL){
context->parser.end_element (context, text, context->user_data, error);
if (error != NULL && *error != NULL){
}
}
free (text);
-
+
context->level = context->level->next;
g_slist_free_1 (current);
+ context->state = FLUSH_TEXT;
break;
} /* case CLOSING_ELEMENT */
return TRUE;
fail:
- if (context->parser.error)
+ if (context->parser.error && *error)
context->parser.error (context, *error, context->user_data);
destroy_parse_state (context);
return NULL;
}
+RESULT
+mcs_config (void)
+{
+ return markup_test ("<configuration>\r\n <system.diagnostics>\r\n <trace autoflush=\"true\" indentsize=\"4\">\r\n <listeners>\r\n <add name=\"compilerLogListener\" type=\"System.Diagnostics.TextWriterTraceListener,System\"/> </listeners> </trace> </system.diagnostics> </configuration>");
+
+}
+
static Test markup_tests [] = {
{"invalid_documents", invalid_documents},
{"good_documents", valid_documents},
{"mono_domain", mono_domain},
+ {"mcs_config", mcs_config},
{NULL, NULL}
};