- md5
- 42420a3e232eb2456a7e38d0099bb417
- sha1
- e9fe6717292c7100845e93d048e36c471fc08316
- sha256
- 101884882758bed6b5f1414826ed0f78253a603840fe8f70589937a9ab1a1060
!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";e.defineMode("tiki",function(e){function t(e,t,n){return function(i,o){for(;!i.eol();){if(i.match(t)){o.tokenize=r;break}i.next()}return n&&(o.tokenize=n),e}}function n(e){return function(t,n){for(;!t.eol();)t.next();return n.tokenize=r,e}}function r(e,o){function a(t){return o.tokenize=t,t(e,o)}var u=e.sol(),c=e.next();switch(c){case"{":return e.eat("/"),e.eatSpace(),e.eatWhile(/[^\s\u00a0=\"\'\/?(}]/),o.tokenize=i,"tag";case"_":if(e.eat("_"))return a(t("strong","__",r));break;case"'":if(e.eat("'"))return a(t("em","''",r));break;case"(":if(e.eat("("))return a(t("variable-2","))",r));break;case"[":return a(t("variable-3","]",r));case"|":if(e.eat("|"))return a(t("comment","||"));break;case"-":if(e.eat("="))return a(t("header string","=-",r));if(e.eat("-"))return a(t("error tw-deleted","--",r));break;case"=":if(e.match("=="))return a(t("tw-underline","===",r));break;case":":if(e.eat(":"))return a(t("comment","::"));break;case"^":return a(t("tw-box","^"));case"~":if(e.match("np~"))return a(t("meta","~/np~"))}if(u)switch(c){case"!":return a(e.match("!!!!!")?n("header string"):e.match("!!!!")?n("header string"):e.match("!!!")?n("header string"):e.match("!!")?n("header string"):n("header string"));case"*":case"#":case"+":return a(n("tw-listitem bracket"))}return null}function i(e,t){var n=e.next(),o=e.peek();return"}"==n?(t.tokenize=r,"tag"):"("==n||")"==n?"bracket":"="==n?(g="equals",">"==o&&(e.next(),o=e.peek()),/[\'\"]/.test(o)||(t.tokenize=function(e,t){for(;!e.eol();){var n=e.next(),r=e.peek();if(" "==n||","==n||/[ )}]/.test(r)){t.tokenize=i;break}}return"string"}),"operator"):/[\'\"]/.test(n)?(t.tokenize=function(e){return function(t,n){for(;!t.eol();)if(t.next()==e){n.tokenize=i;break}return"string"}}(n),t.tokenize(e,t)):(e.eatWhile(/[^\s\u00a0=\"\'\/?]/),"keyword")}function o(){for(var e=arguments.length-1;e>=0;e--)p.cc.push(arguments[e])}function a(){return o.apply(null,arguments),!0}function u(e,t){var n=p.context&&p.context.noIndent;p.context={prev:p.context,pluginName:e,indent:p.indented,startOfLine:t,noIndent:n}}function c(){p.context&&(p.context=p.context.prev)}function f(e){if("openPlugin"==e)return p.pluginName=k,a(s,function(e){return function(t){return"selfclosePlugin"==t||"endPlugin"==t?a():"endPlugin"==t?(u(p.pluginName,e),a()):a()}}(p.startOfLine));if("closePlugin"==e){var t=!1;return p.context?(t=p.context.pluginName!=k,c()):t=!0,t&&(m="error"),a(function(e){return function(t){return e&&(m="error"),"endPlugin"==t?a():o()}}(t))}return"string"==e?(p.context&&"!cdata"==p.context.name||u("!cdata"),p.tokenize==r&&c(),a()):a()}function s(e){return"keyword"==e?(m="attribute",a(s)):"equals"==e?a(l,s):o()}function l(e){return"keyword"==e?(m="string",a()):"string"==e?a(d):o()}function d(e){return"string"==e?a(d):o()}var k,g,p,m,x=e.indentUnit;return{startState:function(){return{tokenize:r,cc:[],indented:0,startOfLine:!0,pluginName:null,context:null}},token:function(e,t){if(e.sol()&&(t.startOfLine=!0,t.indented=e.indentation()),e.eatSpace())return null;m=g=k=null;var n=t.tokenize(e,t);if((n||g)&&"comment"!=n)for(p=t;;){if((t.cc.pop()||f)(g||n))break}return t.startOfLine=!1,m||n},indent:function(e,t){var n=e.context;if(n&&n.noIndent)return 0;for(n&&/^{\//.test(t)&&(n=n.prev);n&&!n.startOfLine;)n=n.prev;return n?n.indent+x:0},electricChars:"/"}}),e.defineMIME("text/tiki","tiki")});
No other release has this exact content. See every version of this file.