General fixes for cWEB and updated WL
This commit is contained in:
@@ -761,14 +761,19 @@ static Node *parse_html(Parser *p)
|
||||
|
||||
bool no_body = false;
|
||||
Scanner *s = &p->s;
|
||||
for (;;) {
|
||||
for (int quote = 0;;) {
|
||||
|
||||
int off = s->cur;
|
||||
|
||||
bool quotes = false;
|
||||
while (s->cur < s->len && s->src[s->cur] != '\\' && (quotes || (s->src[s->cur] != '/' && s->src[s->cur] != '>'))) {
|
||||
if (s->src[s->cur] == '"')
|
||||
quotes = !quotes;
|
||||
while (s->cur < s->len && s->src[s->cur] != '\\' && (quote || (s->src[s->cur] != '/' && s->src[s->cur] != '>'))) {
|
||||
if (quote) {
|
||||
if (quote == s->src[s->cur])
|
||||
quote = 0;
|
||||
} else {
|
||||
char c = s->src[s->cur];
|
||||
if (c == '"' || c == '\'')
|
||||
quote = c;
|
||||
}
|
||||
s->cur++;
|
||||
}
|
||||
|
||||
@@ -1432,7 +1437,7 @@ static Node *parse_expr_inner(Parser *p, Node *left, int min_prec, int flags)
|
||||
Token t1 = next_token_or_newline(p);
|
||||
if (precedence(t1, flags) < min_prec) {
|
||||
p->s = saved;
|
||||
break;
|
||||
break;
|
||||
}
|
||||
|
||||
Node *right = parse_atom(p);
|
||||
|
||||
Reference in New Issue
Block a user