%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /home1/lightco1/www/lightingrepublic.com.au/media/editors/codemirror/mode/markdown/
Upload File :
Create Path :
Current File : //home1/lightco1/www/lightingrepublic.com.au/media/editors/codemirror/mode/markdown/markdown.min.js

!function(a){"object"==typeof exports&&"object"==typeof module?a(require("../../lib/codemirror"),require("../xml/xml"),require("../meta")):"function"==typeof define&&define.amd?define(["../../lib/codemirror","../xml/xml","../meta"],a):a(CodeMirror)}(function(a){"use strict";a.defineMode("markdown",function(b,c){function d(c){if(a.findModeByName){var d=a.findModeByName(c);d&&(c=d.mime||d.mimes[0])}var e=a.getMode(b,c);return"null"==e.name?null:e}function e(a,b,c){return b.f=b.inline=c,c(a,b)}function f(a,b,c){return b.f=b.block=c,c(a,b)}function g(a){return!a||!/\S/.test(a.string)}function h(a){return a.linkTitle=!1,a.em=!1,a.strong=!1,a.strikethrough=!1,a.quote=0,a.indentedCode=!1,x&&a.f==j&&(a.f=o,a.block=i),a.trailingSpace=0,a.trailingSpaceNewLine=!1,a.prevLine=a.thisLine,a.thisLine=null,null}function i(a,b){var f=a.sol(),h=b.list!==!1,i=b.indentedCode;b.indentedCode=!1,h&&(b.indentationDiff>=0?(b.indentationDiff<4&&(b.indentation-=b.indentationDiff),b.list=null):b.indentation>0?(b.list=null,b.listDepth=Math.floor(b.indentation/4)):(b.list=!1,b.listDepth=0));var j=null;if(b.indentationDiff>=4)return a.skipToEnd(),i||g(b.prevLine)?(b.indentation-=4,b.indentedCode=!0,y.code):null;if(a.eatSpace())return null;if((j=a.match(E))&&j[1].length<=6)return b.header=j[1].length,c.highlightFormatting&&(b.formatting="header"),b.f=b.inline,m(b);if(!(g(b.prevLine)||b.quote||h||i)&&(j=a.match(F)))return b.header="="==j[0].charAt(0)?1:2,c.highlightFormatting&&(b.formatting="header"),b.f=b.inline,m(b);if(a.eat(">"))return b.quote=f?1:b.quote+1,c.highlightFormatting&&(b.formatting="quote"),a.eatSpace(),m(b);if("["===a.peek())return e(a,b,s);if(a.match(A,!0))return b.hr=!0,y.hr;if((g(b.prevLine)||h)&&(a.match(B,!1)||a.match(C,!1))){var l=null;return a.match(B,!0)?l="ul":(a.match(C,!0),l="ol"),b.indentation=a.column()+a.current().length,b.list=!0,b.listDepth++,c.taskLists&&a.match(D,!1)&&(b.taskList=!0),b.f=b.inline,c.highlightFormatting&&(b.formatting=["list","list-"+l]),m(b)}return c.fencedCodeBlocks&&(j=a.match(H,!0))?(b.fencedChars=j[1],b.localMode=d(j[2]),b.localMode&&(b.localState=b.localMode.startState()),b.f=b.block=k,c.highlightFormatting&&(b.formatting="code-block"),b.code=-1,m(b)):e(a,b,b.inline)}function j(b,c){var d=w.token(b,c.htmlState);if(!x){var e=a.innerMode(w,c.htmlState);("xml"==e.mode.name&&null===e.state.tagStart&&!e.state.context&&e.state.tokenize.isInText||c.md_inside&&b.current().indexOf(">")>-1)&&(c.f=o,c.block=i,c.htmlState=null)}return d}function k(a,b){return b.fencedChars&&a.match(b.fencedChars,!1)?(b.localMode=b.localState=null,b.f=b.block=l,null):b.localMode?b.localMode.token(a,b.localState):(a.skipToEnd(),y.code)}function l(a,b){a.match(b.fencedChars),b.block=i,b.f=o,b.fencedChars=null,c.highlightFormatting&&(b.formatting="code-block"),b.code=1;var d=m(b);return b.code=0,d}function m(a){var b=[];if(a.formatting){b.push(y.formatting),"string"==typeof a.formatting&&(a.formatting=[a.formatting]);for(var d=0;d<a.formatting.length;d++)b.push(y.formatting+"-"+a.formatting[d]),"header"===a.formatting[d]&&b.push(y.formatting+"-"+a.formatting[d]+"-"+a.header),"quote"===a.formatting[d]&&(!c.maxBlockquoteDepth||c.maxBlockquoteDepth>=a.quote?b.push(y.formatting+"-"+a.formatting[d]+"-"+a.quote):b.push("error"))}if(a.taskOpen)return b.push("meta"),b.length?b.join(" "):null;if(a.taskClosed)return b.push("property"),b.length?b.join(" "):null;if(a.linkHref?b.push(y.linkHref,"url"):(a.strong&&b.push(y.strong),a.em&&b.push(y.em),a.strikethrough&&b.push(y.strikethrough),a.linkText&&b.push(y.linkText),a.code&&b.push(y.code)),a.header&&b.push(y.header,y.header+"-"+a.header),a.quote&&(b.push(y.quote),!c.maxBlockquoteDepth||c.maxBlockquoteDepth>=a.quote?b.push(y.quote+"-"+a.quote):b.push(y.quote+"-"+c.maxBlockquoteDepth)),a.list!==!1){var e=(a.listDepth-1)%3;e?1===e?b.push(y.list2):b.push(y.list3):b.push(y.list1)}return a.trailingSpaceNewLine?b.push("trailing-space-new-line"):a.trailingSpace&&b.push("trailing-space-"+(a.trailingSpace%2?"a":"b")),b.length?b.join(" "):null}function n(a,b){return a.match(G,!0)?m(b):void 0}function o(b,d){var e=d.text(b,d);if("undefined"!=typeof e)return e;if(d.list)return d.list=null,m(d);if(d.taskList){var g="x"!==b.match(D,!0)[1];return g?d.taskOpen=!0:d.taskClosed=!0,c.highlightFormatting&&(d.formatting="task"),d.taskList=!1,m(d)}if(d.taskOpen=!1,d.taskClosed=!1,d.header&&b.match(/^#+$/,!0))return c.highlightFormatting&&(d.formatting="header"),m(d);var h=b.sol(),i=b.next();if(d.linkTitle){d.linkTitle=!1;var k=i;"("===i&&(k=")"),k=(k+"").replace(/([.?*+^$[\]\\(){}|-])/g,"\\$1");var l="^\\s*(?:[^"+k+"\\\\]+|\\\\\\\\|\\\\.)"+k;if(b.match(new RegExp(l),!0))return y.linkHref}if("`"===i){var n=d.formatting;c.highlightFormatting&&(d.formatting="code"),b.eatWhile("`");var o=b.current().length;if(0==d.code)return d.code=o,m(d);if(o==d.code){var r=m(d);return d.code=0,r}return d.formatting=n,m(d)}if(d.code)return m(d);if("\\"===i&&(b.next(),c.highlightFormatting)){var s=m(d),t=y.formatting+"-escape";return s?s+" "+t:t}if("!"===i&&b.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return b.match(/\[[^\]]*\]/),d.inline=d.f=q,y.image;if("["===i&&b.match(/.*\](\(.*\)| ?\[.*\])/,!1))return d.linkText=!0,c.highlightFormatting&&(d.formatting="link"),m(d);if("]"===i&&d.linkText&&b.match(/\(.*\)| ?\[.*\]/,!1)){c.highlightFormatting&&(d.formatting="link");var s=m(d);return d.linkText=!1,d.inline=d.f=q,s}if("<"===i&&b.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1)){d.f=d.inline=p,c.highlightFormatting&&(d.formatting="link");var s=m(d);return s?s+=" ":s="",s+y.linkInline}if("<"===i&&b.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1)){d.f=d.inline=p,c.highlightFormatting&&(d.formatting="link");var s=m(d);return s?s+=" ":s="",s+y.linkEmail}if("<"===i&&b.match(/^(!--|\w)/,!1)){var u=b.string.indexOf(">",b.pos);if(-1!=u){var v=b.string.substring(b.start,u);/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(v)&&(d.md_inside=!0)}return b.backUp(1),d.htmlState=a.startState(w),f(b,d,j)}if("<"===i&&b.match(/^\/\w*?>/))return d.md_inside=!1,"tag";var x=!1;if(!c.underscoresBreakWords&&"_"===i&&"_"!==b.peek()&&b.match(/(\w)/,!1)){var z=b.pos-2;if(z>=0){var A=b.string.charAt(z);"_"!==A&&A.match(/(\w)/,!1)&&(x=!0)}}if("*"===i||"_"===i&&!x)if(h&&" "===b.peek());else{if(d.strong===i&&b.eat(i)){c.highlightFormatting&&(d.formatting="strong");var r=m(d);return d.strong=!1,r}if(!d.strong&&b.eat(i))return d.strong=i,c.highlightFormatting&&(d.formatting="strong"),m(d);if(d.em===i){c.highlightFormatting&&(d.formatting="em");var r=m(d);return d.em=!1,r}if(!d.em)return d.em=i,c.highlightFormatting&&(d.formatting="em"),m(d)}else if(" "===i&&(b.eat("*")||b.eat("_"))){if(" "===b.peek())return m(d);b.backUp(1)}if(c.strikethrough)if("~"===i&&b.eatWhile(i)){if(d.strikethrough){c.highlightFormatting&&(d.formatting="strikethrough");var r=m(d);return d.strikethrough=!1,r}if(b.match(/^[^\s]/,!1))return d.strikethrough=!0,c.highlightFormatting&&(d.formatting="strikethrough"),m(d)}else if(" "===i&&b.match(/^~~/,!0)){if(" "===b.peek())return m(d);b.backUp(2)}return" "===i&&(b.match(/ +$/,!1)?d.trailingSpace++:d.trailingSpace&&(d.trailingSpaceNewLine=!0)),m(d)}function p(a,b){var d=a.next();if(">"===d){b.f=b.inline=o,c.highlightFormatting&&(b.formatting="link");var e=m(b);return e?e+=" ":e="",e+y.linkInline}return a.match(/^[^>]+/,!0),y.linkInline}function q(a,b){if(a.eatSpace())return null;var d=a.next();return"("===d||"["===d?(b.f=b.inline=r("("===d?")":"]"),c.highlightFormatting&&(b.formatting="link-string"),b.linkHref=!0,m(b)):"error"}function r(a){return function(b,d){var e=b.next();if(e===a){d.f=d.inline=o,c.highlightFormatting&&(d.formatting="link-string");var f=m(d);return d.linkHref=!1,f}return b.match(v(a),!0)&&b.backUp(1),d.linkHref=!0,m(d)}}function s(a,b){return a.match(/^([^\]\\]|\\.)*\]:/,!1)?(b.f=t,a.next(),c.highlightFormatting&&(b.formatting="link"),b.linkText=!0,m(b)):e(a,b,o)}function t(a,b){if(a.match(/^\]:/,!0)){b.f=b.inline=u,c.highlightFormatting&&(b.formatting="link");var d=m(b);return b.linkText=!1,d}return a.match(/^([^\]\\]|\\.)+/,!0),y.linkText}function u(a,b){return a.eatSpace()?null:(a.match(/^[^\s]+/,!0),void 0===a.peek()?b.linkTitle=!0:a.match(/^(?:\s+(?:"(?:[^"\\]|\\\\|\\.)+"|'(?:[^'\\]|\\\\|\\.)+'|\((?:[^)\\]|\\\\|\\.)+\)))?/,!0),b.f=b.inline=o,y.linkHref+" url")}function v(a){return I[a]||(a=(a+"").replace(/([.?*+^$[\]\\(){}|-])/g,"\\$1"),I[a]=new RegExp("^(?:[^\\\\]|\\\\.)*?("+a+")")),I[a]}var w=a.getMode(b,"text/html"),x="null"==w.name;void 0===c.highlightFormatting&&(c.highlightFormatting=!1),void 0===c.maxBlockquoteDepth&&(c.maxBlockquoteDepth=0),void 0===c.underscoresBreakWords&&(c.underscoresBreakWords=!0),void 0===c.taskLists&&(c.taskLists=!1),void 0===c.strikethrough&&(c.strikethrough=!1),void 0===c.tokenTypeOverrides&&(c.tokenTypeOverrides={});var y={header:"header",code:"comment",quote:"quote",list1:"variable-2",list2:"variable-3",list3:"keyword",hr:"hr",image:"tag",formatting:"formatting",linkInline:"link",linkEmail:"link",linkText:"link",linkHref:"string",em:"em",strong:"strong",strikethrough:"strikethrough"};for(var z in y)y.hasOwnProperty(z)&&c.tokenTypeOverrides[z]&&(y[z]=c.tokenTypeOverrides[z]);var A=/^([*\-_])(?:\s*\1){2,}\s*$/,B=/^[*\-+]\s+/,C=/^[0-9]+([.)])\s+/,D=/^\[(x| )\](?=\s)/,E=c.allowAtxHeaderWithoutSpace?/^(#+)/:/^(#+)(?: |$)/,F=/^ *(?:\={1,}|-{1,})\s*$/,G=/^[^#!\[\]*_\\<>` "'(~]+/,H=new RegExp("^("+(c.fencedCodeBlocks===!0?"~~~+|```+":c.fencedCodeBlocks)+")[ \\t]*([\\w+#]*)"),I=[],J={startState:function(){return{f:i,prevLine:null,thisLine:null,block:i,htmlState:null,indentation:0,inline:o,text:n,formatting:!1,linkText:!1,linkHref:!1,linkTitle:!1,code:0,em:!1,strong:!1,header:0,hr:!1,taskList:!1,list:!1,listDepth:0,quote:0,trailingSpace:0,trailingSpaceNewLine:!1,strikethrough:!1,fencedChars:null}},copyState:function(b){return{f:b.f,prevLine:b.prevLine,thisLine:b.thisLine,block:b.block,htmlState:b.htmlState&&a.copyState(w,b.htmlState),indentation:b.indentation,localMode:b.localMode,localState:b.localMode?a.copyState(b.localMode,b.localState):null,inline:b.inline,text:b.text,formatting:!1,linkTitle:b.linkTitle,code:b.code,em:b.em,strong:b.strong,strikethrough:b.strikethrough,header:b.header,hr:b.hr,taskList:b.taskList,list:b.list,listDepth:b.listDepth,quote:b.quote,indentedCode:b.indentedCode,trailingSpace:b.trailingSpace,trailingSpaceNewLine:b.trailingSpaceNewLine,md_inside:b.md_inside,fencedChars:b.fencedChars}},token:function(a,b){if(b.formatting=!1,a!=b.thisLine){var c=b.header||b.hr;if(b.header=0,b.hr=!1,a.match(/^\s*$/,!0)||c){if(h(b),!c)return null;b.prevLine=null}b.prevLine=b.thisLine,b.thisLine=a,b.taskList=!1,b.trailingSpace=0,b.trailingSpaceNewLine=!1,b.f=b.block;var d=a.match(/^\s*/,!0)[0].replace(/\t/g,"    ").length,e=4*Math.floor((d-b.indentation)/4);e>4&&(e=4);var f=b.indentation+e;if(b.indentationDiff=f-b.indentation,b.indentation=f,d>0)return null}return b.f(a,b)},innerMode:function(a){return a.block==j?{state:a.htmlState,mode:w}:a.localState?{state:a.localState,mode:a.localMode}:{state:a,mode:J}},blankLine:h,getType:m,fold:"markdown"};return J},"xml"),a.defineMIME("text/x-markdown","markdown")});

Zerion Mini Shell 1.0