1(function(a){if(typeof exports=="object"&&typeof module=="object")a(require("../../lib/codemirror"));else if(typeof define=="function"&&define.amd)define(["../../lib/codemirror"],a);else a(CodeMirror)})(function(a){"use strict";a.defineMode("tiddlywiki",function(){var a={};var b={allTags:true,closeAll:true,list:true,newJournal:true,newTiddler:true,permaview:true,saveChanges:true,search:true,slider:true,tabs:true,tag:true,tagging:true,tags:true,tiddler:true,timeline:true,today:true,version:true,option:true,"with":true,filter:true};var c=/[\w_\-]/i,d=/^\-\-\-\-+$/,e=/^\/\*\*\*$/,f=/^\*\*\*\/$/,g=/^<<<$/,h=/^\/\/\{\{\{$/,i=/^\/\/\}\}\}$/,j=/^<!--\{\{\{-->$/,k=/^<!--\}\}\}-->$/,l=/^\{\{\{$/,m=/^\}\}\}$/,n=/.*?\}\}\}/;function o(a,b,c){b.tokenize=c;return c(a,b)}function p(b,m){var n=b.sol(),p=b.peek();m.block=false;if(n&&/[<\/\*{}\-]/.test(p)){if(b.match(l)){m.block=true;return o(b,m,s)}if(b.match(g))return"quote";if(b.match(e)||b.match(f))return"comment";if(b.match(h)||b.match(i)||b.match(j)||b.match(k))return"comment";if(b.match(d))return"hr"}b.next();if(n&&/[\/\*!#;:>|]/.test(p)){if(p=="!"){b.skipToEnd();return"header"}if(p=="*"){b.eatWhile("*");return"comment"}if(p=="#"){b.eatWhile("#");return"comment"}if(p==";"){b.eatWhile(";");return"comment"}if(p==":"){b.eatWhile(":");return"comment"}if(p==">"){b.eatWhile(">");return"quote"}if(p=="|")return"header"}if(p=="{"&&b.match(/\{\{/))return o(b,m,s);if(/[hf]/i.test(p)&&/[ti]/i.test(b.peek())&&b.match(/\b(ttps?|tp|ile):\/\/[\-A-Z0-9+&@#\/%?=~_|$!:,.;]*[A-Z0-9+&@#\/%=~_|$]/i))return"link";if(p=='"')return"string";if(p=="~")return"brace";if(/[\[\]]/.test(p)&&b.match(p))return"brace";if(p=="@"){b.eatWhile(c);return"link"}if(/\d/.test(p)){b.eatWhile(/\d/);return"number"}if(p=="/"){if(b.eat("%")){return o(b,m,q)}else if(b.eat("/")){return o(b,m,t)}}if(p=="_"&&b.eat("_"))return o(b,m,u);if(p=="-"&&b.eat("-")){if(b.peek()!=" ")return o(b,m,v);if(b.peek()==" ")return"brace"}if(p=="'"&&b.eat("'"))return o(b,m,r);if(p=="<"&&b.eat("<"))return o(b,m,w);b.eatWhile(/[\w\$_]/);return a.propertyIsEnumerable(b.current())?"keyword":null}function q(a,b){var c=false,d;while(d=a.next()){if(d=="/"&&c){b.tokenize=p;break}c=d=="%"}return"comment"}function r(a,b){var c=false,d;while(d=a.next()){if(d=="'"&&c){b.tokenize=p;break}c=d=="'"}return"strong"}function s(a,b){var c=b.block;if(c&&a.current()){return"comment"}if(!c&&a.match(n)){b.tokenize=p;return"comment"}if(c&&a.sol()&&a.match(m)){b.tokenize=p;return"comment"}a.next();return"comment"}function t(a,b){var c=false,d;while(d=a.next()){if(d=="/"&&c){b.tokenize=p;break}c=d=="/"}return"em"}function u(a,b){var c=false,d;while(d=a.next()){if(d=="_"&&c){b.tokenize=p;break}c=d=="_"}return"underlined"}function v(a,b){var c=false,d;while(d=a.next()){if(d=="-"&&c){b.tokenize=p;break}c=d=="-"}return"strikethrough"}function w(a,c){if(a.current()=="<<"){return"macro"}var d=a.next();if(!d){c.tokenize=p;return null}if(d==">"){if(a.peek()==">"){a.next();c.tokenize=p;return"macro"}}a.eatWhile(/[\w\$_]/);return b.propertyIsEnumerable(a.current())?"keyword":null}return{startState:function(){return{tokenize:p}},token:function(a,b){if(a.eatSpace())return null;var c=b.tokenize(a,b);return c}}});a.defineMIME("text/x-tiddlywiki","tiddlywiki")}); 2//# sourceMappingURL=tiddlywiki.min.js.map