on master help sign in
Get both pieces working on a similar example
04b3bd0Neil Mitchell
gen/Main.hs+3−2
@@ -41,8 +41,9 @@ buildRule from to act = do
41 act
41 act
42
42
43examples :: [(Bool, String)]
43examples :: [(Bool, String)]
44−examples =
44+examples = take 1
45− [(True, "<test />")
45+ [(True, "<test foo='123 xyz'><inner /> value</test>")
46+ ,(True, "<test />")
46 ,(True, "<test id='bob'>here<extra/>there</test>")
47 ,(True, "<test id='bob'>here<extra/>there</test>")
47 ,(True, "<test /><close />")
48 ,(True, "<test /><close />")
48 ,(True, "<test /><!-- comment > --><close />")
49 ,(True, "<test /><!-- comment > --><close />")
gen/test.c+1−1
@@ -335,7 +335,7 @@ document* hexml_document_parse(const char* s, int slen)
335
335
336int main()
336int main()
337{
337{
338− const document* d = hexml_document_parse("<test foo='123 xyz'/>", -1);
338+ const document* d = hexml_document_parse("<test foo='123 xyz'><inner /> value</test>", -1);
339 char buf[1000];
339 char buf[1000];
340 int len = hexml_node_render(d, hexml_document_node(d), buf, sizeof(buf));
340 int len = hexml_node_render(d, hexml_document_node(d), buf, sizeof(buf));
341 buf[len] = 0;
341 buf[len] = 0;