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

View File

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