| 215 | } |
| 216 | |
| 217 | static void kill_indent(struct strbuf *sb, |
| 218 | const struct json_writer *jw) |
| 219 | { |
| 220 | int k; |
| 221 | int eat_it = 0; |
| 222 | |
| 223 | strbuf_reset(sb); |
| 224 | for (k = 0; k < jw->json.len; k++) { |
| 225 | char ch = jw->json.buf[k]; |
| 226 | if (eat_it && ch == ' ') |
| 227 | continue; |
| 228 | if (ch == '\n') { |
| 229 | eat_it = 1; |
| 230 | continue; |
| 231 | } |
| 232 | eat_it = 0; |
| 233 | strbuf_addch(sb, ch); |
| 234 | } |
| 235 | } |
| 236 | |
| 237 | static void append_sub_jw(struct json_writer *jw, |
| 238 | const struct json_writer *value) |
no test coverage detected