PluginProbe ʕ •ᴥ•ʔ
SiteOrigin CSS / 1.2.2
SiteOrigin CSS v1.2.2
1.2.1 1.2.10 1.2.11 1.2.12 1.2.13 1.2.14 1.2.2 1.2.3 1.2.4 1.2.5 1.2.6 1.2.7 1.2.8 1.2.9 1.3.0 1.3.1 1.3.2 1.4.0 1.4.1 1.4.2 1.4.3 1.5.0 1.5.1 1.5.10 1.5.11 1.5.2 1.5.3 1.5.4 1.5.5 1.5.6 1.5.7 1.5.8 1.5.9 1.6.0 1.6.1 1.6.2 1.6.3 1.6.4 1.6.5 1.6.6 trunk 1.0 1.0.1 1.0.2 1.0.3 1.0.4 1.0.5 1.0.6 1.0.7 1.0.8 1.1 1.1.1 1.1.2 1.1.3 1.1.4 1.1.5 1.2.0
so-css / lib / codemirror / mode / sass / sass.min.js
so-css / lib / codemirror / mode / sass Last commit date
index.html 9 years ago sass.js 9 years ago sass.min.js 8 years ago test.js 9 years ago test.min.js 9 years ago
sass.min.js
1 lines
1 !function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror"),require("../css/css")):"function"==typeof define&&define.amd?define(["../../lib/codemirror","../css/css"],e):e(CodeMirror)}(function(e){"use strict";e.defineMode("sass",function(r){function t(e){return!e.peek()||e.match(/\s+$/,!1)}function n(e,r){var t=e.peek();return")"===t?(e.next(),r.tokenizer=s,"operator"):"("===t?(e.next(),e.eatSpace(),"operator"):"'"===t||'"'===t?(r.tokenizer=i(e.next()),"string"):(r.tokenizer=i(")",!1),"string")}function o(e,r){return function(t,n){return t.sol()&&t.indentation()<=e?(n.tokenizer=s,s(t,n)):(r&&t.skipTo("*/")?(t.next(),t.next(),n.tokenizer=s):t.skipToEnd(),"comment")}}function i(e,r){function n(o,i){var u=o.next(),f=o.peek(),c=o.string.charAt(o.pos-2);return"\\"!==u&&f===e||u===e&&"\\"!==c?(u!==e&&r&&o.next(),t(o)&&(i.cursorHalf=0),i.tokenizer=s,"string"):"#"===u&&"{"===f?(i.tokenizer=a(n),o.next(),"operator"):"string"}return null==r&&(r=!0),n}function a(e){return function(r,t){return"}"===r.peek()?(r.next(),t.tokenizer=e,"operator"):s(r,t)}}function u(e){if(0==e.indentCount){e.indentCount++;var t=e.scopes[0].offset,n=t+r.indentUnit;e.scopes.unshift({offset:n})}}function f(e){1!=e.scopes.length&&e.scopes.shift()}function s(e,r){var c=e.peek();if(e.match("/*"))return r.tokenizer=o(e.indentation(),!0),r.tokenizer(e,r);if(e.match("//"))return r.tokenizer=o(e.indentation(),!1),r.tokenizer(e,r);if(e.match("#{"))return r.tokenizer=a(s),"operator";if('"'===c||"'"===c)return e.next(),r.tokenizer=i(c),"string";if(r.cursorHalf){if("#"===c&&(e.next(),e.match(/[0-9a-fA-F]{6}|[0-9a-fA-F]{3}/)))return t(e)&&(r.cursorHalf=0),"number";if(e.match(/^-?[0-9\.]+/))return t(e)&&(r.cursorHalf=0),"number";if(e.match(/^(px|em|in)\b/))return t(e)&&(r.cursorHalf=0),"unit";if(e.match(x))return t(e)&&(r.cursorHalf=0),"keyword";if(e.match(/^url/)&&"("===e.peek())return r.tokenizer=n,t(e)&&(r.cursorHalf=0),"atom";if("$"===c)return e.next(),e.eatWhile(/[\w-]/),t(e)&&(r.cursorHalf=0),"variable-2";if("!"===c)return e.next(),r.cursorHalf=0,e.match(/^[\w]+/)?"keyword":"operator";if(e.match(v))return t(e)&&(r.cursorHalf=0),"operator";if(e.eatWhile(/[\w-]/))return t(e)&&(r.cursorHalf=0),p=e.current().toLowerCase(),d.hasOwnProperty(p)?"atom":m.hasOwnProperty(p)?"keyword":h.hasOwnProperty(p)?(r.prevProp=e.current().toLowerCase(),"property"):"tag";if(t(e))return r.cursorHalf=0,null}else{if("-"===c&&e.match(/^-\w+-/))return"meta";if("."===c){if(e.next(),e.match(/^[\w-]+/))return u(r),"qualifier";if("#"===e.peek())return u(r),"tag"}if("#"===c){if(e.next(),e.match(/^[\w-]+/))return u(r),"builtin";if("#"===e.peek())return u(r),"tag"}if("$"===c)return e.next(),e.eatWhile(/[\w-]/),"variable-2";if(e.match(/^-?[0-9\.]+/))return"number";if(e.match(/^(px|em|in)\b/))return"unit";if(e.match(x))return"keyword";if(e.match(/^url/)&&"("===e.peek())return r.tokenizer=n,"atom";if("="===c&&e.match(/^=[\w-]+/))return u(r),"meta";if("+"===c&&e.match(/^\+[\w-]+/))return"variable-3";if("@"===c&&e.match(/@extend/)&&(e.match(/\s*[\w]/)||f(r)),e.match(/^@(else if|if|media|else|for|each|while|mixin|function)/))return u(r),"def";if("@"===c)return e.next(),e.eatWhile(/[\w-]/),"def";if(e.eatWhile(/[\w-]/)){if(e.match(/ *: *[\w-\+\$#!\("']/,!1)){p=e.current().toLowerCase();var l=r.prevProp+"-"+p;return h.hasOwnProperty(l)?"property":h.hasOwnProperty(p)?(r.prevProp=p,"property"):k.hasOwnProperty(p)?"property":"tag"}return e.match(/ *:/,!1)?(u(r),r.cursorHalf=1,r.prevProp=e.current().toLowerCase(),"property"):e.match(/ *,/,!1)?"tag":(u(r),"tag")}if(":"===c)return e.match(z)?"variable-3":(e.next(),r.cursorHalf=1,"operator")}return e.match(v)?"operator":(e.next(),null)}function c(e,t){e.sol()&&(t.indentCount=0);var n=t.tokenizer(e,t),o=e.current();if("@return"!==o&&"}"!==o||f(t),null!==n){for(var i=e.pos-o.length,a=i+r.indentUnit*t.indentCount,u=[],s=0;s<t.scopes.length;s++){var c=t.scopes[s];c.offset<=a&&u.push(c)}t.scopes=u}return n}var p,l=e.mimeModes["text/css"],h=l.propertyKeywords||{},m=l.colorKeywords||{},d=l.valueKeywords||{},k=l.fontProperties||{},w=["true","false","null","auto"],x=new RegExp("^"+w.join("|")),y=["\\(","\\)","=",">","<","==",">=","<=","\\+","-","\\!=","/","\\*","%","and","or","not",";","\\{","\\}",":"],v=function(e){return new RegExp("^"+e.join("|"))}(y),z=/^::?[a-zA-Z_][\w\-]*/;return{startState:function(){return{tokenizer:s,scopes:[{offset:0,type:"sass"}],indentCount:0,cursorHalf:0,definedVars:[],definedMixins:[]}},token:function(e,r){var t=c(e,r);return r.lastToken={style:t,content:e.current()},t},indent:function(e){return e.scopes[0].offset}}}),e.defineMIME("text/x-sass","sass")});