Path: blob/master/web-gui/buildyourownbotnet/assets/js/codemirror/mode/haml/test.js
1293 views
(function() {1var mode = CodeMirror.getMode({tabSize: 4, indentUnit: 2}, "haml");2function MT(name) { test.mode(name, mode, Array.prototype.slice.call(arguments, 1)); }34// Requires at least one media query5MT("elementName",6"[tag %h1] Hey There");78MT("oneElementPerLine",9"[tag %h1] Hey There %h2");1011MT("idSelector",12"[tag %h1][attribute #test] Hey There");1314MT("classSelector",15"[tag %h1][attribute .hello] Hey There");1617MT("docType",18"[tag !!! XML]");1920MT("comment",21"[comment / Hello WORLD]");2223MT("notComment",24"[tag %h1] This is not a / comment ");2526MT("attributes",27"[tag %a]([variable title][operator =][string \"test\"]){[atom :title] [operator =>] [string \"test\"]}");2829MT("htmlCode",30"[tag <h1>]Title[tag </h1>]");3132MT("rubyBlock",33"[operator =][variable-2 @item]");3435MT("selectorRubyBlock",36"[tag %a.selector=] [variable-2 @item]");3738MT("nestedRubyBlock",39"[tag %a]",40" [operator =][variable puts] [string \"test\"]");4142MT("multilinePlaintext",43"[tag %p]",44" Hello,",45" World");4647MT("multilineRuby",48"[tag %p]",49" [comment -# this is a comment]",50" [comment and this is a comment too]",51" Date/Time",52" [operator -] [variable now] [operator =] [tag DateTime][operator .][variable now]",53" [tag %strong=] [variable now]",54" [operator -] [keyword if] [variable now] [operator >] [tag DateTime][operator .][variable parse]([string \"December 31, 2006\"])",55" [operator =][string \"Happy\"]",56" [operator =][string \"Belated\"]",57" [operator =][string \"Birthday\"]");5859MT("multilineComment",60"[comment /]",61" [comment Multiline]",62" [comment Comment]");6364MT("hamlComment",65"[comment -# this is a comment]");6667MT("multilineHamlComment",68"[comment -# this is a comment]",69" [comment and this is a comment too]");7071MT("multilineHTMLComment",72"[comment <!--]",73" [comment what a comment]",74" [comment -->]");7576MT("hamlAfterRubyTag",77"[attribute .block]",78" [tag %strong=] [variable now]",79" [attribute .test]",80" [operator =][variable now]",81" [attribute .right]");8283MT("stretchedRuby",84"[operator =] [variable puts] [string \"Hello\"],",85" [string \"World\"]");8687MT("interpolationInHashAttribute",88//"[tag %div]{[atom :id] [operator =>] [string \"#{][variable test][string }_#{][variable ting][string }\"]} test");89"[tag %div]{[atom :id] [operator =>] [string \"#{][variable test][string }_#{][variable ting][string }\"]} test");9091MT("interpolationInHTMLAttribute",92"[tag %div]([variable title][operator =][string \"#{][variable test][string }_#{][variable ting]()[string }\"]) Test");93})();949596