-
-
Notifications
You must be signed in to change notification settings - Fork 34
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
Escaping a partial #62
Comments
@lawlesscreation Thanks for the issue! If you're reporting a bug, please be sure to include:
|
The last example should work. Could you post the assemble part of your grunt config and let us know if you're using any other helpers or plugins? In an older version of |
@doowb, thanks for the reply. For me, the last example simple renders the handlebars expression as text i.e.:
|
Sadly, I've still not been able to work this one out. I'll try to create a demo repo on GitHub and link to it. |
@lawlesscreation I was traveling and missed your first response... I'll take a closer look today. A demo repo will help a lot, thanks! |
Here's a demo of the problem: https://github.com/lawlesscreation/grunt-assemble-demo Rendered output:
Running on Node v6.11.3 |
@lawlesscreation I think I misunderstood what you're trying to accomplish. I thought that you wanted the result to be Now that I've looked over it again, I think that you want the html contents of the rendered partial. {{#markdown}}
```html
{{> alert modifiers="warning" }}
```
{{/markdown}} This produces the following:
|
Thanks @doowb! that works great! Looking at your solution reminded me that originally I had tried to use markdown for the pages instead of handlebars (it would be a lot easier to write documentation in MD). The problem was that when I included a You don't happen to know if this is possible? Most of the content in the page will be markdown so it seems easier than wrapping every block individually with update: I can actually cheat a little and invert the tags to close/open those from the layout:
Feels like a hack though :) |
I've not found a better way to do this yet but it still feels a little hacky. Is there a better way to use handlebars partials inside a |
@lawlesscreation I thought I responded to this the other day... I haven't had a chance to look into it more, but you should be able to do what you were trying in the original I'll try to take a closer look and get back to you. |
I'm trying out a few tools for creating a style guide and Assemble seems to fit the bill but I'm stumbling when trying to implement a key feature. I want to be able include a partial twice with the second one escaped (rendered as text) - similar to how Twitter bootstrap and other styleguides document code:
After scouring Google for Assemble/Handlebars mentions of how to escape a partial, I'm still none the wiser. Any help would be appreciated.
The text was updated successfully, but these errors were encountered: