Commit Diff


commit - 424803ac446821016c55b334cd85a83aba4d3f37
commit + 19a5edf3da4acec32a964ac91c065e121b0a0ec2
blob - e626a5c1982cf4b49415b877bfca979ec3c3ab01
blob + c97478128fa19c9cddcf687a802db929cfa6bd36
--- template/parse.y
+++ template/parse.y
@@ -89,7 +89,7 @@ typedef struct {
 %token	DEFINE ELSE END ERROR FINALLY FOR IF INCLUDE PRINTF
 %token	RENDER TQFOREACH UNSAFE URLESCAPE WHILE
 %token	<v.string>	STRING
-%type	<v.string>	string
+%type	<v.string>	string nstring
 %type	<v.string>	stringy
 
 %%
@@ -137,7 +137,7 @@ verbatims	: /* empty */
 		| verbatims verbatim
 		;
 
-raw		: STRING {
+raw		: nstring {
 			dbg();
 			fprintf(fp, "if ((tp_ret = tp->tp_puts(tp, ");
 			printq($1);
@@ -290,6 +290,15 @@ finally		: '{' FINALLY '}' {
 		} verbatims
 		;
 
+nstring	:	STRING nstring {
+			if (asprintf(&$$, "%s%s", $1, $2) == -1)
+				err(1, "asprintf");
+			free($1);
+			free($2);
+		}
+		| STRING
+		;
+
 string		: STRING string {
 			if (asprintf(&$$, "%s %s", $1, $2) == -1)
 				err(1, "asprintf");