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

[Question] Possible to force the parser / compiler to process a block as a literal without parsing it's content? #345

Closed
ovaillancourt opened this issue Oct 3, 2013 · 2 comments

Comments

@ovaillancourt
Copy link

We happen to have to compile a template that contains smarty template tags (see example below) provided by a third party, which conflict with the dustjs tags. Is there a way to have the dustjs parser and compiler completely ignore a block of content in a template?

ie: a tag or pragma that would say "ignore the content of that section, just render it as-is"?

(I'm aware that we can resolve the issue in different ways such as providing the faulty content through the context and disabling escaping, but I'm curious as to whether dust has such feature built-in.)

Example of template content that we'd like to be parsed as a raw literal by the parser (notice the {literal} tags conflicting):

 <script type="text/javascript">/*{literal}<![CDATA[*/
content here
  /*]]>{/literal}*/</script>

Thanks!

@jimmyhchan
Copy link
Contributor

There is a pull request to do just that

@ovaillancourt
Copy link
Author

Oh wow, completely missed that one! Thanks for the pointer.

For other people's reference: #334

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

No branches or pull requests

2 participants