+
Skip to content

Problem with {{, even when changing delimiters #20

@gerrymanoim

Description

@gerrymanoim

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载