Do not walk whitespace on create_rule

This commit is contained in:
Devine Lu Linvega 2024-04-12 10:07:42 -07:00
parent 8bdb791365
commit 5249d7612d
1 changed files with 1 additions and 1 deletions

View File

@ -163,7 +163,6 @@ create_rule(Rule *r, int id, char *s)
char c;
r->id = id, s += 2;
r->a = dict_, s = parse_frag(s), r->b = dict_, s = parse_frag(s);
while((c = *s) && c <= ' ') s++;
return s;
}
@ -178,6 +177,7 @@ rewrite(void)
if(s[0] == '<' && s[1] == '>') {
r = rules_++;
s = create_rule(r, rules_ - rules - 1, s);
while((c = *s) && c <= ' ') s++;
return commit_rule(r, s, 1);
}
if(s[0] == '?' && s[1] == '(') {