Minimal dependency-free XML parser and serializer
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

xmlt: fix Fmt.str arg grouping in bprintf replacement

+4 -4
+3 -3
bench/bench_xmlt.ml
··· 13 13 Buffer.add_char buf '<'; 14 14 Buffer.add_string buf tag; 15 15 for i = 0 to attr_count - 1 do 16 - Buffer.add_string buf (Fmt.str " a%d=\")value%d\"" i i 16 + Buffer.add_string buf (Fmt.str " a%d=\"value%d\"" i i) 17 17 done; 18 18 if d >= depth then Buffer.add_string buf "/>" 19 19 else begin ··· 22 22 for _ = 0 to children - 1 do 23 23 node (d + 1) 24 24 done; 25 - Buffer.add_string buf (Fmt.str "</%s>") tag 25 + Buffer.add_string buf (Fmt.str "</%s>" tag) 26 26 end 27 27 in 28 28 node 0; ··· 113 113 let buf = Buffer.create 256 in 114 114 Buffer.add_string buf "<items>"; 115 115 for i = 0 to 99 do 116 - Buffer.add_string buf (Fmt.str "<item>value%d</item>") i 116 + Buffer.add_string buf (Fmt.str "<item>value%d</item>" i) 117 117 done; 118 118 Buffer.add_string buf "</items>"; 119 119 Buffer.contents buf
+1 -1
fuzz/gen_corpus.ml
··· 20 20 (let buf = Buffer.create 4096 in 21 21 Buffer.add_string buf "<root>"; 22 22 for i = 0 to 99 do 23 - Buffer.add_string buf (Fmt.str "<item id=\")%d\">value %d</item>" i i 23 + Buffer.add_string buf (Fmt.str "<item id=\"%d\">value %d</item>" i i) 24 24 done; 25 25 Buffer.add_string buf "</root>"; 26 26 Buffer.contents buf);