Fix missing loop in content stream
This commit is contained in:
parent
5fc5ec88d8
commit
1c637e6a94
|
@ -10,27 +10,29 @@ void hbs_content(hbu_pipe_t pipe);
|
|||
#include "./tag.c"
|
||||
|
||||
void hbs_content(hbu_pipe_t pipe) {
|
||||
hb_eod_char_t c = hbu_pipe_peek_eoi(pipe);
|
||||
while (1) {
|
||||
hb_eod_char_t c = hbu_pipe_peek_eoi(pipe);
|
||||
|
||||
switch (c) {
|
||||
case HB_EOD:
|
||||
return;
|
||||
|
||||
case '<':
|
||||
if (hbu_pipe_peek_offset(pipe, 2) == '/') {
|
||||
// Callee is responsible for requiring close tag (or not, if root)
|
||||
switch (c) {
|
||||
case HB_EOD:
|
||||
return;
|
||||
|
||||
case '<':
|
||||
if (hbu_pipe_peek_offset(pipe, 2) == '/') {
|
||||
// Callee is responsible for requiring close tag (or not, if root)
|
||||
return;
|
||||
}
|
||||
|
||||
hbs_tag(pipe);
|
||||
break;
|
||||
|
||||
case '&':
|
||||
// TODO
|
||||
break;
|
||||
|
||||
default:
|
||||
hbu_pipe_accept(pipe);
|
||||
}
|
||||
|
||||
hbs_tag(pipe);
|
||||
break;
|
||||
|
||||
case '&':
|
||||
// TODO
|
||||
break;
|
||||
|
||||
default:
|
||||
hbu_pipe_accept(pipe);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue