Commit Diff


commit - 1066c216d10ab00c41500809f448f0ba90ae060d
commit + 279f742de00c9d81cb53a5442d3c179091191cc7
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");