Commit Diff


commit - fdd79f2f3fc3c04e0d548d15436f36fc7d39bb52
commit + d28713dbf90ca19706036b85e548dfdb4069b206
blob - 1e6a9fd07ea3c0e471801ffd54afd0a5773dc68c
blob + 4aee74ee52af6f9230f3ed9bf0e1446d58e75dd8
--- template/parse.y
+++ template/parse.y
@@ -91,7 +91,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
 
 %%
@@ -139,7 +139,7 @@ verbatims	: /* empty */
 		| verbatims verbatim
 		;
 
-raw		: STRING {
+raw		: nstring {
 			dbg();
 			fprintf(fp, "if ((tp_ret = tp->tp_puts(tp, ");
 			printq($1);
@@ -292,6 +292,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");