{ "headers" : { "an XHTML XML prolog" : { "haml" : "!!! XML", "html" : "", "config" : { "format" : "xhtml" } }, "an XHTML default (transitional) doctype" : { "haml" : "!!!", "html" : "", "config" : { "format" : "xhtml" } }, "an XHTML 1.1 doctype" : { "haml" : "!!! 1.1", "html" : "", "config" : { "format" : "xhtml" } }, "an XHTML 1.2 mobile doctype" : { "haml" : "!!! mobile", "html" : "", "config" : { "format" : "xhtml" } }, "an XHTML 1.1 basic doctype" : { "haml" : "!!! basic", "html" : "", "config" : { "format" : "xhtml" } }, "an XHTML 1.0 frameset doctype" : { "haml" : "!!! frameset", "html" : "", "config" : { "format" : "xhtml" } }, "an HTML 5 doctype with XHTML syntax" : { "haml" : "!!! 5", "html" : "", "config" : { "format" : "xhtml" } }, "an HTML 5 XML prolog (silent)" : { "haml" : "!!! XML", "html" : "", "config" : { "format" : "html5" } }, "an HTML 5 doctype" : { "haml" : "!!!", "html" : "", "config" : { "format" : "html5" } }, "an HTML 4 XML prolog (silent)" : { "haml" : "!!! XML", "html" : "", "config" : { "format" : "html4" } }, "an HTML 4 default (transitional) doctype" : { "haml" : "!!!", "html" : "", "config" : { "format" : "html4" } }, "an HTML 4 frameset doctype" : { "haml" : "!!! frameset", "html" : "", "config" : { "format" : "html4" } }, "an HTML 4 strict doctype" : { "haml" : "!!! strict", "html" : "", "config" : { "format" : "html4" } } }, "basic Haml tags and CSS": { "a simple Haml tag" : { "haml" : "%p", "html" : "
" }, "a self-closing tag (XHTML)" : { "haml" : "%meta", "html" : "", "config" : { "format" : "xhtml" } }, "a self-closing tag (HTML4)" : { "haml" : "%meta", "html" : "", "config" : { "format" : "html4" } }, "a self-closing tag (HTML5)" : { "haml" : "%meta", "html" : "", "config" : { "format" : "html5" } }, "a self-closing tag ('/' modifier + XHTML)" : { "haml" : "%zzz/", "html" : "hello
" }, "Inline content tag with CSS" : { "haml" : "%p.class1 hello", "html" : "hello
" }, "Inline content multiple simple tags" : { "haml" : "%div\n %div\n %p text", "html" : "text
\n\n hello\n
" }, "Nested content tag with CSS" : { "haml" : "%p.class1\n hello", "html" : "\n hello\n
" }, "Nested content multiple simple tags" : { "haml" : "%div\n %div\n %p\n text", "html" : "\n text\n
\nvalue
", "optional" : true, "locals" : { "var" : "value" } }, "no interpolation when escaped" : { "haml" : "%p \\#{var}", "html" : "#{var}
", "optional" : true, "locals" : { "var" : "value" } }, "interpolation when the escape character is escaped" : { "haml" : "%p \\\\#{var}", "html" : "\\value
", "optional" : true, "locals" : { "var" : "value" } }, "interpolation inside filtered content" : { "haml" : ":plain\n #{var} interpolated: #{var}", "html" : "value interpolated: value", "optional" : true, "locals" : { "var" : "value" } } }, "HTML escaping" : { "code following '&='" : { "haml" : "&= '<\"&>'", "html" : "<"&>" }, "code following '=' when escape_haml is set to true" : { "haml" : "= '<\"&>'", "html" : "<"&>", "config" : { "escape_html" : "true" } }, "code following '!=' when escape_haml is set to true" : { "haml" : "!= '<\"&>'", "html" : "<\"&>", "config" : { "escape_html" : "true" } } }, "boolean attributes" : { "boolean attribute with XHTML" : { "haml" : "%input(checked=true)", "html" : "", "config" : { "format" : "xhtml" } }, "boolean attribute with HTML" : { "haml" : "%input(checked=true)", "html" : "", "config" : { "format" : "html5" } } }, "whitespace preservation" : { "following the '~' operator" : { "haml" : "~ \"Foo\\nBar\\nBaz\"", "html" : "Foo\n
Bar Baz", "optional" : true }, "inside a textarea tag" : { "haml" : "%textarea\n hello\n hello", "html" : "" }, "inside a pre tag" : { "haml" : "%pre\n hello\n hello", "html" : "
hello\nhello" } }, "whitespace removal" : { "a tag with '>' appended and inline content" : { "haml" : "%li hello\n%li> world\n%li again", "html" : "
hello\nworld
" } } }