Liferay.Loader.define("fragment-web$codemirror@5.65.2/mode/haml/haml",["module","exports","require","../../lib/codemirror","../htmlmixed/htmlmixed","../ruby/ruby"],(function(e,t,n){var r,i=void 0;window;r=function(e){"use strict";e.defineMode("haml",(function(t){var n=e.getMode(t,{name:"htmlmixed"}),r=e.getMode(t,"ruby");function rubyInQuote(e){return function(t,n){return t.peek()==e&&1==n.rubyState.tokenize.length?(t.next(),n.tokenize=html,"closeAttributeTag"):ruby(t,n)}}function ruby(e,t){return e.match("-#")?(e.skipToEnd(),"comment"):r.token(e,t.rubyState)}function html(e,t){var r=e.peek();if("comment"==t.previousToken.style&&t.indented>t.previousToken.indented)return e.skipToEnd(),"commentLine";if(t.startOfLine){if("!"==r&&e.match("!!"))return e.skipToEnd(),"tag";if(e.match(/^%[\w:#\.]+=/))return t.tokenize=ruby,"hamlTag";if(e.match(/^%[\w:]+/))return"hamlTag";if("/"==r)return e.skipToEnd(),"comment"}if((t.startOfLine||"hamlTag"==t.previousToken.style)&&("#"==r||"."==r))return e.match(/[\w-#\.]*/),"hamlAttribute";if(t.startOfLine&&!e.match("--\x3e",!1)&&("="==r||"-"==r))return t.tokenize=ruby,t.tokenize(e,t);if("hamlTag"==t.previousToken.style||"closeAttributeTag"==t.previousToken.style||"hamlAttribute"==t.previousToken.style){if("("==r)return t.tokenize=rubyInQuote(")"),t.tokenize(e,t);if("{"==r&&!e.match(/^\{%.*/))return t.tokenize=rubyInQuote("}"),t.tokenize(e,t)}return n.token(e,t.htmlState)}return{startState:function(){return{htmlState:e.startState(n),rubyState:e.startState(r),indented:0,previousToken:{style:null,indented:0},tokenize:html}},copyState:function(t){return{htmlState:e.copyState(n,t.htmlState),rubyState:e.copyState(r,t.rubyState),indented:t.indented,previousToken:t.previousToken,tokenize:t.tokenize}},token:function(e,t){if(e.sol()&&(t.indented=e.indentation(),t.startOfLine=!0),e.eatSpace())return null;var n=t.tokenize(e,t);if(t.startOfLine=!1,n&&"commentLine"!=n&&(t.previousToken={style:n,indented:t.indented}),e.eol()&&t.tokenize==ruby){e.backUp(1);var r=e.peek();e.next(),r&&","!=r&&(t.tokenize=html)}return"hamlTag"==n?n="tag":"commentLine"==n?n="comment":"hamlAttribute"==n?n="attribute":"closeAttributeTag"==n&&(n=null),n}}}),"htmlmixed","ruby"),e.defineMIME("text/x-haml","haml")},"object"==typeof t&&"object"==typeof e?r(n("../../lib/codemirror"),n("../htmlmixed/htmlmixed"),n("../ruby/ruby")):"function"==typeof i&&i.amd?i(["../../lib/codemirror","../htmlmixed/htmlmixed","../ruby/ruby"],r):r(CodeMirror)}));
//# sourceMappingURL=haml.js.map