From 7555a02c04c578d21c009e13de201f944377abd1 Mon Sep 17 00:00:00 2001 From: RichMorin Date: Thu, 23 Feb 2012 14:32:40 -0800 Subject: [PATCH] Updated Liquid for Designers (markdown) --- Liquid-for-Designers.md | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/Liquid-for-Designers.md b/Liquid-for-Designers.md index 5fa217a..a880964 100644 --- a/Liquid-for-Designers.md +++ b/Liquid-for-Designers.md @@ -84,7 +84,8 @@ Here is a list of currently supported tags: * **cycle** - Cycle is usually used within a loop to alternate between values, like colors or DOM classes. * **for** - For loop * **if** - Standard if/else block -* **include** - Includes another template, useful for partials +* **include** - Includes another template; useful for partials +* **raw** - temporarily disable tag processing to avoid syntax conflicts. * **unless** - Mirror of if statement ### Comments @@ -95,6 +96,17 @@ Comment is the simplest tag. It just swallows content. We made 1 million dollars {% comment %} in losses {% endcomment %} this year ``` +### Raw + +Raw temporarily disables tag processing. +This is useful for generating content (eg, Mustache, Handlebars) which uses conflicting syntax. + +```liquid +{% raw %} + In Handlebars, {{ this }} will be HTML-escaped, but {{{ that }}} will not. +{% endraw %} +``` + ### If / Else `if / else` should be well known from any imaginable programming language. @@ -327,4 +339,4 @@ the given variable instead of rendering it to the screen. -``` +``` \ No newline at end of file