Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem with {{, even when changing delimiters #20

Open
gerrymanoim opened this issue Dec 3, 2015 · 2 comments
Open

Problem with {{, even when changing delimiters #20

gerrymanoim opened this issue Dec 3, 2015 · 2 comments
Labels

Comments

@gerrymanoim
Copy link

I've been trying to get whisker working with LaTeX (which uses a lot of braces)

At first I thought it wouldn't be an issue since there's proper nesting:

> template <- 
+ 
+ 'Hello {{{{name}}}}
+ You have just won ${{value}}!
+ 
+ '
> text <- whisker.render(template, data)
> cat(text)
Hello 
You have just won $10000!

So I thought, fine, I'll just switch the delimeters:

> template <- 
+ '
+ {{=<% %>=}}
+ Hello {{<%name%>}}
+ You have just won ${{<%value%>}}!
+ 
+ '
> text <- whisker.render(template, data)
> cat(text)

Hello ~~~~~~~~~~~~~Chris{{
You have just won $}}10000~~~~~~~~~~~~~!

Which is a bit weird? Apologies if I'm just doing something incorrectly.

@pat-s
Copy link

pat-s commented Sep 25, 2019

Is this issue still on the agenda? This blocks us in the linked PR above.

@cole-brokamp
Copy link

The new delimiter (<%) should not include the {{= part, so your template should be:

{{=<% %>=}}
Hello <%name%>
You have just won $<%value%>!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants