Current File : /home/pacjaorg/public_html/kmm/media/vendor/codemirror/mode/haml/haml.min.js
(function(t){typeof exports=="object"&&typeof module=="object"?t(require("../../lib/codemirror"),require("../htmlmixed/htmlmixed"),require("../ruby/ruby")):typeof define=="function"&&define.amd?define(["../../lib/codemirror","../htmlmixed/htmlmixed","../ruby/ruby"],t):t(CodeMirror)})(function(t){"use strict";t.defineMode("haml",function(c){var r=t.getMode(c,{name:"htmlmixed"}),l=t.getMode(c,"ruby");function k(n){return function(e,i){var o=e.peek();return o==n&&i.rubyState.tokenize.length==1?(e.next(),i.tokenize=f,"closeAttributeTag"):u(e,i)}}function u(n,e){return n.match("-#")?(n.skipToEnd(),"comment"):l.token(n,e.rubyState)}function f(n,e){var i=n.peek();if(e.previousToken.style=="comment"&&e.indented>e.previousToken.indented)return n.skipToEnd(),"commentLine";if(e.startOfLine){if(i=="!"&&n.match("!!"))return n.skipToEnd(),"tag";if(n.match(/^%[\w:#\.]+=/))return e.tokenize=u,"hamlTag";if(n.match(/^%[\w:]+/))return"hamlTag";if(i=="/")return n.skipToEnd(),"comment"}if((e.startOfLine||e.previousToken.style=="hamlTag")&&(i=="#"||i=="."))return n.match(/[\w-#\.]*/),"hamlAttribute";if(e.startOfLine&&!n.match("-->",!1)&&(i=="="||i=="-"))return e.tokenize=u,e.tokenize(n,e);if(e.previousToken.style=="hamlTag"||e.previousToken.style=="closeAttributeTag"||e.previousToken.style=="hamlAttribute"){if(i=="(")return e.tokenize=k(")"),e.tokenize(n,e);if(i=="{"&&!n.match(/^\{%.*/))return e.tokenize=k("}"),e.tokenize(n,e)}return r.token(n,e.htmlState)}return{startState:function(){var n=t.startState(r),e=t.startState(l);return{htmlState:n,rubyState:e,indented:0,previousToken:{style:null,indented:0},tokenize:f}},copyState:function(n){return{htmlState:t.copyState(r,n.htmlState),rubyState:t.copyState(l,n.rubyState),indented:n.indented,previousToken:n.previousToken,tokenize:n.tokenize}},token:function(n,e){if(n.sol()&&(e.indented=n.indentation(),e.startOfLine=!0),n.eatSpace())return null;var i=e.tokenize(n,e);if(e.startOfLine=!1,i&&i!="commentLine"&&(e.previousToken={style:i,indented:e.indented}),n.eol()&&e.tokenize==u){n.backUp(1);var o=n.peek();n.next(),o&&o!=","&&(e.tokenize=f)}return i=="hamlTag"?i="tag":i=="commentLine"?i="comment":i=="hamlAttribute"?i="attribute":i=="closeAttributeTag"&&(i=null),i}}},"htmlmixed","ruby"),t.defineMIME("text/x-haml","haml")});
Site is undergoing maintenance

PACJA Events

Maintenance mode is on

Site will be available soon. Thank you for your patience!