CoreFiles by mySites.guru
slim.min.js1 lines, 7,493 bytes, from Joomla_4.0.0-alpha2-Alpha-Full_Package.zip
Raw History Compare with 3.10.0-alpha9
md5
e1bc25b3cf82784db685a03c74986924
sha1
02ab04a74e95babb6324ebf796471643ce0df8a5
sha256
ddaf1f03b06bc0844bac41acc61abe2417c327ef86e1faafa8e86c7ca6fd138c
!function(t){"object"==typeof exports&&"object"==typeof module?t(require("../../lib/codemirror"),require("../htmlmixed/htmlmixed"),require("../ruby/ruby")):"function"==typeof define&&define.amd?define(["../../lib/codemirror","../htmlmixed/htmlmixed","../ruby/ruby"],t):t(CodeMirror)}(function(t){"use strict";t.defineMode("slim",function(e){function n(t,e){t.stack={parent:t.stack,style:"continuation",indented:e,tokenize:t.line},t.line=t.tokenize}function i(t){t.line==t.tokenize&&(t.line=t.stack.tokenize,t.stack=t.stack.parent)}function r(t,e){return function(n,i){return n.peek()==t&&1==i.rubyState.tokenize.length?(n.next(),i.tokenize=e,"closeAttributeTag"):u(n,i)}}function o(e){var n,i=function(t,i){if(1==i.rubyState.tokenize.length&&!i.rubyState.context.prev){if(t.backUp(1),t.eatSpace())return i.rubyState=n,i.tokenize=e,e(t,i);t.next()}return u(t,i)};return function(e,r){return n=r.rubyState,r.rubyState=t.startState($),r.tokenize=i,u(e,r)}}function u(t,e){return $.token(t,e.rubyState)}function a(t,e){return t.match(/^#\{/)?(e.tokenize=r("}",e.tokenize),null):function(t,e,n,i,r){var o=t.current(),u=o.search(n);return u>-1&&(e.tokenize=function(t,e,n){var i=function(i,r){return r.tokenize=e,i.pos<t?(i.pos=t,n):r.tokenize(i,r)};return function(t,n){return n.tokenize=i,e(t,n)}}(t.pos,e.tokenize,r),t.backUp(o.length-u-i)),r}(t,e,/[^\\]#\{/,1,L.token(t,e.htmlState))}function c(t){return function(e,n){var i=function(t,e){return t.match(/^\\$/)?"lineContinuation":a(t,e)}(e,n);return e.eol()&&(n.tokenize=t),i}}function l(t,e,n){return e.stack={parent:e.stack,style:"html",indented:t.column()+n,tokenize:e.line},e.line=e.tokenize=a,null}function s(t,e){return t.skipToEnd(),e.stack.style}function k(t,e){return t.eat(e.stack.endQuote)?(e.line=e.stack.line,e.tokenize=e.stack.tokenize,e.stack=e.stack.parent,null):t.match(_)?(e.tokenize=d,"slimAttribute"):(t.next(),null)}function d(t,e){return t.match(/^==?/)?(e.tokenize=m,null):k(t,e)}function m(t,e){var n=t.peek();return'"'==n||"'"==n?(e.tokenize=E(n,"string",!0,!1,k),t.next(),e.tokenize(t,e)):"["==n?o(k)(t,e):t.match(/^(true|false|nil)\b/)?(e.tokenize=k,"keyword"):o(k)(t,e)}function f(e,n){if(e.match(/^#\{/))return n.tokenize=r("}",n.tokenize),null;var i=new t.StringStream(e.string.slice(n.stack.indented),e.tabSize);i.pos=e.pos-n.stack.indented,i.start=e.start-n.stack.indented,i.lastColumnPos=e.lastColumnPos-n.stack.indented,i.lastColumnValue=e.lastColumnValue-n.stack.indented;var o=n.subMode.token(i,n.subState);return e.pos=i.pos+n.stack.indented,o}function b(t,e){return e.stack.indented=t.column(),e.line=e.tokenize=f,e.tokenize(t,e)}function z(n){return T.hasOwnProperty(n)?T[n]:T[n]=function(n){var i=U[n],r=t.mimeModes[i];if(r)return t.getMode(e,r);var o=t.modes[i];return o?o(e,{name:i}):t.getMode(e,"null")}(n)}function p(t,e){return t.skipToEnd(),"slimDoctype"}function x(e,r){if("<"==e.peek())return(r.tokenize=c(r.tokenize))(e,r);if(e.match(/^[|']/))return l(e,r,1);if(e.match(/^\/(!|\[\w+])?/))return function(t,e){return e.stack={parent:e.stack,style:"comment",indented:e.indented+1,tokenize:e.line},e.line=s,s(t,e)}(e,r);if(e.match(/^(-|==?[<>]?)/))return r.tokenize=function(t,e){return function(r,o){if(i(o),r.match(/^\\$/))return n(o,t),"lineContinuation";var u=e(r,o);return r.eol()&&r.current().match(/(?:^|[^\\])(?:\\\\)*\\$/)&&r.backUp(1),u}}(e.column(),function(t,e){return function(r,o){i(o);var u=e(r,o);return r.eol()&&r.current().match(/,$/)&&n(o,t),u}}(e.column(),u)),"slimSwitch";if(e.match(/^doctype\b/))return r.tokenize=p,"keyword";var o=e.match(j);return o?function(e,n){var i=z(e),r=t.startState(i);return n.subMode=i,n.subState=r,n.stack={parent:n.stack,style:"sub",indented:n.indented+1,tokenize:n.line},n.line=n.tokenize=b,"slimSubmode"}(o[1],r):y(e,r)}function h(t,e){return e.startOfLine?x(t,e):y(t,e)}function y(t,e){return t.eat("*")?(e.tokenize=o(S),null):t.match(P)?(e.tokenize=S,"slimTag"):w(t,e)}function S(t,e){return t.match(/^(<>?|><?)/)?(e.tokenize=w,null):w(t,e)}function w(t,e){return t.match(Q)?(e.tokenize=w,"slimId"):t.match(D)?(e.tokenize=w,"slimClass"):g(t,e)}function g(t,e){return t.match(/^([\[\{\(])/)?function(t,e,n){return t.stack={parent:t.stack,style:"wrapper",indented:t.indented+1,tokenize:n,line:t.line,endQuote:e},t.line=t.tokenize=k,null}(e,R[RegExp.$1],g):t.match(Z)?(e.tokenize=M,"slimAttribute"):"*"==t.peek()?(t.next(),e.tokenize=o(A),null):A(t,e)}function M(t,e){return t.match(/^==?/)?(e.tokenize=v,null):g(t,e)}function v(t,e){var n=t.peek();return'"'==n||"'"==n?(e.tokenize=E(n,"string",!0,!1,g),t.next(),e.tokenize(t,e)):"["==n?o(g)(t,e):":"==n?o(C)(t,e):t.match(/^(true|false|nil)\b/)?(e.tokenize=g,"keyword"):o(g)(t,e)}function C(t,e){return t.backUp(1),t.match(/^[^\s],(?=:)/)?(e.tokenize=o(C),null):(t.next(),g(t,e))}function E(t,e,o,u,a){return function(c,l){i(l);var s=0==c.current().length;if(c.match(/^\\$/,s))return s?(n(l,l.indented),"lineContinuation"):e;if(c.match(/^#\{/,s))return s?(l.tokenize=r("}",l.tokenize),null):e;for(var k,d=!1;null!=(k=c.next());){if(k==t&&(u||!d)){l.tokenize=a;break}if(o&&"#"==k&&!d&&c.eat("{")){c.backUp(2);break}d=!d&&"\\"==k}return c.eol()&&d&&c.backUp(1),e}}function A(t,e){return t.match(/^==?/)?(e.tokenize=u,"slimSwitch"):t.match(/^\/$/)?(e.tokenize=h,null):t.match(/^:/)?(e.tokenize=y,"slimSwitch"):(l(t,e,0),e.tokenize(t,e))}var L=t.getMode(e,{name:"htmlmixed"}),$=t.getMode(e,"ruby"),T={html:L,ruby:$},U={ruby:"ruby",javascript:"javascript",css:"text/css",sass:"text/x-sass",scss:"text/x-scss",less:"text/x-less",styl:"text/x-styl",coffee:"coffeescript",asciidoc:"text/x-asciidoc",markdown:"text/x-markdown",textile:"text/x-textile",creole:"text/x-creole",wiki:"text/x-wiki",mediawiki:"text/x-mediawiki",rdoc:"text/x-rdoc",builder:"text/x-builder",nokogiri:"text/x-nokogiri",erb:"application/x-erb"},j=function(t){var e=[];for(var n in t)e.push(n);return new RegExp("^("+e.join("|")+"):")}(U),O={commentLine:"comment",slimSwitch:"operator special",slimTag:"tag",slimId:"attribute def",slimClass:"attribute qualifier",slimAttribute:"attribute",slimSubmode:"keyword special",closeAttributeTag:null,slimDoctype:null,lineContinuation:null},R={"{":"}","[":"]","(":")"},q="_a-zA-ZÀ-ÖØ-öø-˿Ͱ-ͽͿ-῿‌-‍⁰-↏Ⰰ-⿯、-퟿豈-﷏ﷰ-�",I=q+"\\-0-9·̀-ͯ‿-⁀",P=new RegExp("^[:"+q+"](?::["+I+"]|["+I+"]*)"),Z=new RegExp("^[:"+q+"][:\\."+I+"]*(?=\\s*=)"),_=new RegExp("^[:"+q+"][:\\."+I+"]*"),D=/^\.-?[_a-zA-Z]+[\w\-]*/,Q=/^#[_a-zA-Z]+[\w\-]*/,V={startState:function(){return{htmlState:t.startState(L),rubyState:t.startState($),stack:null,last:null,tokenize:h,line:h,indented:0}},copyState:function(e){return{htmlState:t.copyState(L,e.htmlState),rubyState:t.copyState($,e.rubyState),subMode:e.subMode,subState:e.subMode&&t.copyState(e.subMode,e.subState),stack:e.stack,last:e.last,tokenize:e.tokenize,line:e.line}},token:function(t,e){if(t.sol())for(e.indented=t.indentation(),e.startOfLine=!0,e.tokenize=e.line;e.stack&&e.stack.indented>e.indented&&"slimSubmode"!=e.last;)e.line=e.tokenize=e.stack.tokenize,e.stack=e.stack.parent,e.subMode=null,e.subState=null;if(t.eatSpace())return null;var n=e.tokenize(t,e);return e.startOfLine=!1,n&&(e.last=n),O.hasOwnProperty(n)?O[n]:n},blankLine:function(t){if(t.subMode&&t.subMode.blankLine)return t.subMode.blankLine(t.subState)},innerMode:function(t){return t.subMode?{state:t.subState,mode:t.subMode}:{state:t,mode:V}}};return V},"htmlmixed","ruby"),t.defineMIME("text/x-slim","slim"),t.defineMIME("application/x-slim","slim")});

No other release has this exact content. See every version of this file.