A register is surrounded by spacers

This commit is contained in:
Devine Lu Linvega 2024-04-20 12:00:25 -07:00
parent b725a608da
commit 9029c64c77
1 changed files with 1 additions and 1 deletions

View File

@ -138,7 +138,7 @@ write_rule(Rule *r, char last, char *res)
{
char c, *b = r->b, *origin = dst_;
while((c = *b++))
if(c == '?' && last != '\\' && regs[(int)*b])
if(c == '?' && regs[(int)*b] && spacer(last) && spacer(b[1]))
put_reg(*b++);
else
*dst_++ = c, last = c;