commit c063deb1a1e9296c7ac51636144f503a07b39195 from: Omar Polo date: Fri Oct 21 17:08:20 2022 UTC fix parsing of {! !} block after content the '{' and '!' characters were pushed back in the wrong order and so read as "!{" instead of "{!". add regress for this case, and for similar usage (02 change.) commit - fb8060decee7be8f96efe15fbaa570b7169f0f00 commit + c063deb1a1e9296c7ac51636144f503a07b39195 blob - 38f801e710c7cd79e1ad80f0252443b807fa3a0f blob + cc565367073134d2ca3c57c3490c0c75658581ce --- template/parse.y +++ template/parse.y @@ -528,8 +528,8 @@ newblock: do { if (starting) { if (c == '!' || c == '{') { - lungetc('{'); lungetc(c); + lungetc('{'); break; } starting = 0; blob - 25bb26665cd7d677de93698fa4e3a01e5e6ace15 blob + f6ff16ddf36ba82a8f3d8c475da40bac90745b50 --- template/regress/02-only-verbatim.tmpl +++ template/regress/02-only-verbatim.tmpl @@ -1,6 +1,6 @@ {! #include !} -noise +noise {! /* woops */ !} here {! blob - f7aef5e2c673f80c7bfad865930f815b8c58859b blob + 05d5356f0237714e97f152adcb5775588cf6084c --- template/regress/03-block.tmpl +++ template/regress/03-block.tmpl @@ -7,7 +7,7 @@ {{ title }} - + {! /* TODO: frobnicate this line! */ !}

{{ title }}

blob - 1321d087e7cfe62f16d62f44bf67ec720e19be5a blob + 204658cfc35574683741428a182a05d8b4c43549 --- template/regress/03.expected +++ template/regress/03.expected @@ -1,2 +1,2 @@ - *hello*

*hello*

-<hello>

<hello>

+ *hello*

*hello*

+<hello>

<hello>