Keep percent signs if not followed by {} block.

The before code would skip a percent sign even if it was not followed by a {}
block. The after code checks the same condition but only advances p if a {} block
is found and otherwise passes it through as text.
This commit is contained in:
Chad Voegele 2015-07-14 10:47:49 -07:00 committed by chad
parent a390ef6a5c
commit 63a55dd06c
1 changed files with 2 additions and 1 deletions

View File

@ -485,7 +485,8 @@ parse (char *text)
if (*p == '\0' || *p == '\n')
return;
if (*p == '%' && p++ && *p == '{' && (block_end = strchr(p++, '}'))) {
if (*p == '%' && *(p+1) == '{' && (block_end = strchr(p++, '}'))) {
p++;
while (p < block_end) {
while (isspace(*p))
p++;