2 lines
2.9 KiB
JavaScript
2 lines
2.9 KiB
JavaScript
(self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[21716],{21716:function(B,o,c){"use strict";c.r(o),c.d(o,{tiddlyWiki:function(){return E}});var f={},k={allTags:!0,closeAll:!0,list:!0,newJournal:!0,newTiddler:!0,permaview:!0,saveChanges:!0,search:!0,slider:!0,tabs:!0,tag:!0,tagging:!0,tags:!0,tiddler:!0,timeline:!0,today:!0,version:!0,option:!0,with:!0,filter:!0},h=/[\w_\-]/i,d=/^\-\-\-\-+$/,a=/^\/\*\*\*$/,p=/^\*\*\*\/$/,w=/^<<<$/,b=/^\/\/\{\{\{$/,v=/^\/\/\}\}\}$/,y=/^<!--\{\{\{-->$/,S=/^<!--\}\}\}-->$/,C=/^\{\{\{$/,$=/^\}\}\}$/,W=/.*?\}\}\}/;function u(e,t,r){return t.tokenize=r,r(e,t)}function i(e,t){var r=e.sol(),n=e.peek();if(t.block=!1,r&&/[<\/\*{}\-]/.test(n)){if(e.match(C))return t.block=!0,u(e,t,l);if(e.match(w))return"quote";if(e.match(a)||e.match(p)||e.match(b)||e.match(v)||e.match(y)||e.match(S))return"comment";if(e.match(d))return"contentSeparator"}if(e.next(),r&&/[\/\*!#;:>|]/.test(n)){if(n=="!")return e.skipToEnd(),"header";if(n=="*")return e.eatWhile("*"),"comment";if(n=="#")return e.eatWhile("#"),"comment";if(n==";")return e.eatWhile(";"),"comment";if(n==":")return e.eatWhile(":"),"comment";if(n==">")return e.eatWhile(">"),"quote";if(n=="|")return"header"}if(n=="{"&&e.match("{{"))return u(e,t,l);if(/[hf]/i.test(n)&&/[ti]/i.test(e.peek())&&e.match(/\b(ttps?|tp|ile):\/\/[\-A-Z0-9+&@#\/%?=~_|$!:,.;]*[A-Z0-9+&@#\/%=~_|$]/i))return"link";if(n=='"')return"string";if(n=="~"||/[\[\]]/.test(n)&&e.match(n))return"brace";if(n=="@")return e.eatWhile(h),"link";if(/\d/.test(n))return e.eatWhile(/\d/),"number";if(n=="/"){if(e.eat("%"))return u(e,t,g);if(e.eat("/"))return u(e,t,_)}if(n=="_"&&e.eat("_"))return u(e,t,m);if(n=="-"&&e.eat("-")){if(e.peek()!=" ")return u(e,t,T);if(e.peek()==" ")return"brace"}return n=="'"&&e.eat("'")?u(e,t,z):n=="<"&&e.eat("<")?u(e,t,x):(e.eatWhile(/[\w\$_]/),f.propertyIsEnumerable(e.current())?"keyword":null)}function g(e,t){for(var r=!1,n;n=e.next();){if(n=="/"&&r){t.tokenize=i;break}r=n=="%"}return"comment"}function z(e,t){for(var r=!1,n;n=e.next();){if(n=="'"&&r){t.tokenize=i;break}r=n=="'"}return"strong"}function l(e,t){var r=t.block;return r&&e.current()?"comment":!r&&e.match(W)||r&&e.sol()&&e.match($)?(t.tokenize=i,"comment"):(e.next(),"comment")}function _(e,t){for(var r=!1,n;n=e.next();){if(n=="/"&&r){t.tokenize=i;break}r=n=="/"}return"emphasis"}function m(e,t){for(var r=!1,n;n=e.next();){if(n=="_"&&r){t.tokenize=i;break}r=n=="_"}return"link"}function T(e,t){for(var r=!1,n;n=e.next();){if(n=="-"&&r){t.tokenize=i;break}r=n=="-"}return"deleted"}function x(e,t){if(e.current()=="<<")return"meta";var r=e.next();return r?r==">"&&e.peek()==">"?(e.next(),t.tokenize=i,"meta"):(e.eatWhile(/[\w\$_]/),k.propertyIsEnumerable(e.current())?"keyword":null):(t.tokenize=i,null)}const E={name:"tiddlywiki",startState:function(){return{tokenize:i}},token:function(e,t){if(e.eatSpace())return null;var r=t.tokenize(e,t);return r}}}}]);
|