\{{ escape is not tested at all due to incorrectly written test cases:
\{{
Test.expect(render('t \{{t}},{{r}},{{x.y.z}}',{t:2,x:{y:{z:2}}}) === 't 2,,2', 'test multiple bars') Test.expect(render('t \{{ {{x}}',{x:25}) === 't {{ 25', 'Test escaped brackets')
\ is not escaped inside the the string, so they do not appear at all. This is why the first test case work as intended, while the second one simply have unmatched brackets (but can still pass if the bracket matching is made to be non-greedy).
\
This is a duplicate of https://www.codewars.com/kata/56ae72854d005c7447000023 and https://www.codewars.com/kata/59418db3f5c394eca80000ef combined with slight changes (bracket notation, escape handlebar. But notable the former is trivial, and the latter is broken in the current tests).
please do not use Test.expect :(
Test.expect
Loading collection data...
\{{
escape is not tested at all due to incorrectly written test cases:\
is not escaped inside the the string, so they do not appear at all. This is why the first test case work as intended, while the second one simply have unmatched brackets (but can still pass if the bracket matching is made to be non-greedy).This is a duplicate of https://www.codewars.com/kata/56ae72854d005c7447000023 and https://www.codewars.com/kata/59418db3f5c394eca80000ef combined with slight changes (bracket notation, escape handlebar. But notable the former is trivial, and the latter is broken in the current tests).
please do not use
Test.expect
:(