CoreFiles by mySites.guru
textile.min.js1 lines, 7,062 bytes, from Joomla_4.0.0-alpha2-Alpha-Full_Package.zip
Raw History Compare with 3.10.0-alpha9
md5
022502b4749374150a61817e8256b329
sha1
574f925e4f5559a934b156b4809984149ef51c71
sha256
bd942c9161d79a74fa0e4cdd8733d3792a4b6e35b0e2ca0abba7afa44858ca92
!function(t){"object"==typeof exports&&"object"==typeof module?t(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],t):t(CodeMirror)}(function(t){"use strict";function e(t,e,a){if("_"===a)return t.eat("_")?n(t,e,"italic",/__/,2):n(t,e,"em",/_/,1);if("*"===a)return t.eat("*")?n(t,e,"bold",/\*\*/,2):n(t,e,"strong",/\*/,1);if("["===a)return t.match(/\d+\]/)&&(e.footCite=!0),i(e);if("("===a){if(t.match(/^(r|tm|c)\)/))return r(e,u.specialChar)}if("<"===a&&t.match(/(\w+)[^>]+>[^<]+<\/\1>/))return r(e,u.html);if("?"===a&&t.eat("?"))return n(t,e,"cite",/\?\?/,2);if("="===a&&t.eat("="))return n(t,e,"notextile",/==/,2);if("-"===a&&!t.eat("-"))return n(t,e,"deletion",/-/,1);if("+"===a)return n(t,e,"addition",/\+/,1);if("~"===a)return n(t,e,"sub",/~/,1);if("^"===a)return n(t,e,"sup",/\^/,1);if("%"===a)return n(t,e,"span",/%/,1);if("@"===a)return n(t,e,"code",/@/,1);if("!"===a){var l=n(t,e,"image",/(?:\([^\)]+\))?!/,1);return t.match(/^:\S+/),l}return i(e)}function n(t,e,n,a,r){var l=t.pos>r?t.string.charAt(t.pos-r-1):null,o=t.peek();if(e[n]){if((!o||/\W/.test(o))&&l&&/\S/.test(l)){var u=i(e);return e[n]=!1,u}}else(!l||/\W/.test(l))&&o&&/\S/.test(o)&&t.match(new RegExp("^.*\\S"+a.source+"(?:\\W|$)"),!1)&&(e[n]=!0,e.mode=c.attributes);return i(e)}function i(t){var e=a(t);if(e)return e;var n=[];return t.layoutType&&n.push(u[t.layoutType]),n=n.concat(function(t){for(var e=[],n=1;n<arguments.length;++n)t[arguments[n]]&&e.push(u[arguments[n]]);return e}(t,"addition","bold","cite","code","deletion","em","footCite","image","italic","link","span","strong","sub","sup","table","tableHeading")),"header"===t.layoutType&&n.push(u.header+"-"+t.header),n.length?n.join(" "):null}function a(t){var e=t.layoutType;switch(e){case"notextile":case"code":case"pre":return u[e];default:return t.notextile?u.notextile+(e?" "+u[e]:""):null}}function r(t,e){var n=a(t);if(n)return n;var r=i(t);return e?r?r+" "+e:e:r}function l(t){var e=t.spanningLayout,n=t.layoutType;for(var i in t)t.hasOwnProperty(i)&&delete t[i];t.mode=c.newLayout,e&&(t.layoutType=n,t.spanningLayout=!0)}function o(t){return s.cache[t]||(s.cache[t]=s.createRe(t))}var u={addition:"positive",attributes:"attribute",bold:"strong",cite:"keyword",code:"atom",definitionList:"number",deletion:"negative",div:"punctuation",em:"em",footnote:"variable",footCite:"qualifier",header:"header",html:"comment",image:"string",italic:"em",link:"link",linkDefinition:"link",list1:"variable-2",list2:"variable-3",list3:"keyword",notextile:"string-2",pre:"operator",p:"property",quote:"bracket",span:"quote",specialChar:"tag",strong:"strong",sub:"builtin",sup:"builtin",table:"variable-3",tableHeading:"operator"},s={cache:{},single:{bc:"bc",bq:"bq",definitionList:/- .*?:=+/,definitionListEnd:/.*=:\s*$/,div:"div",drawTable:/\|.*\|/,foot:/fn\d+/,header:/h[1-6]/,html:/\s*<(?:\/)?(\w+)(?:[^>]+)?>(?:[^<]+<\/\1>)?/,link:/[^"]+":\S/,linkDefinition:/\[[^\s\]]+\]\S+/,list:/(?:#+|\*+)/,notextile:"notextile",para:"p",pre:"pre",table:"table",tableCellAttributes:/[\/\\]\d+/,tableHeading:/\|_\./,tableText:/[^"_\*\[\(\?\+~\^%@|-]+/,text:/[^!"_=\*\[\(<\?\+~\^%@-]+/},attributes:{align:/(?:<>|<|>|=)/,selector:/\([^\(][^\)]+\)/,lang:/\[[^\[\]]+\]/,pad:/(?:\(+|\)+){1,2}/,css:/\{[^\}]+\}/},createRe:function(t){switch(t){case"drawTable":return s.makeRe("^",s.single.drawTable,"$");case"html":return s.makeRe("^",s.single.html,"(?:",s.single.html,")*","$");case"linkDefinition":return s.makeRe("^",s.single.linkDefinition,"$");case"listLayout":return s.makeRe("^",s.single.list,o("allAttributes"),"*\\s+");case"tableCellAttributes":return s.makeRe("^",s.choiceRe(s.single.tableCellAttributes,o("allAttributes")),"+\\.");case"type":return s.makeRe("^",o("allTypes"));case"typeLayout":return s.makeRe("^",o("allTypes"),o("allAttributes"),"*\\.\\.?","(\\s+|$)");case"attributes":return s.makeRe("^",o("allAttributes"),"+");case"allTypes":return s.choiceRe(s.single.div,s.single.foot,s.single.header,s.single.bc,s.single.bq,s.single.notextile,s.single.pre,s.single.table,s.single.para);case"allAttributes":return s.choiceRe(s.attributes.selector,s.attributes.css,s.attributes.lang,s.attributes.align,s.attributes.pad);default:return s.makeRe("^",s.single[t])}},makeRe:function(){for(var t="",e=0;e<arguments.length;++e){var n=arguments[e];t+="string"==typeof n?n:n.source}return new RegExp(t)},choiceRe:function(){for(var t=[arguments[0]],e=1;e<arguments.length;++e)t[2*e-1]="|",t[2*e]=arguments[e];return t.unshift("(?:"),t.push(")"),s.makeRe.apply(null,t)}},c={newLayout:function(t,e){if(t.match(o("typeLayout"),!1))return e.spanningLayout=!1,(e.mode=c.blockType)(t,e);var n;return a(e)||(t.match(o("listLayout"),!1)?n=c.list:t.match(o("drawTable"),!1)?n=c.table:t.match(o("linkDefinition"),!1)?n=c.linkDefinition:t.match(o("definitionList"))?n=c.definitionList:t.match(o("html"),!1)&&(n=c.html)),(e.mode=n||c.text)(t,e)},blockType:function(t,e){var n,a;return e.layoutType=null,(n=t.match(o("type")))?(a=n[0],(n=a.match(o("header")))?(e.layoutType="header",e.header=parseInt(n[0][1])):a.match(o("bq"))?e.layoutType="quote":a.match(o("bc"))?e.layoutType="code":a.match(o("foot"))?e.layoutType="footnote":a.match(o("notextile"))?e.layoutType="notextile":a.match(o("pre"))?e.layoutType="pre":a.match(o("div"))?e.layoutType="div":a.match(o("table"))&&(e.layoutType="table"),e.mode=c.attributes,i(e)):(e.mode=c.text)(t,e)},text:function(t,n){if(t.match(o("text")))return i(n);var a=t.next();return'"'===a?(n.mode=c.link)(t,n):e(t,n,a)},attributes:function(t,e){return e.mode=c.layoutLength,t.match(o("attributes"))?r(e,u.attributes):i(e)},layoutLength:function(t,e){return t.eat(".")&&t.eat(".")&&(e.spanningLayout=!0),e.mode=c.text,i(e)},list:function(t,e){var n=t.match(o("list"));e.listDepth=n[0].length;var a=(e.listDepth-1)%3;return e.layoutType=a?1===a?"list2":"list3":"list1",e.mode=c.attributes,i(e)},link:function(t,e){return e.mode=c.text,t.match(o("link"))?(t.match(/\S+/),r(e,u.link)):i(e)},linkDefinition:function(t,e){return t.skipToEnd(),r(e,u.linkDefinition)},definitionList:function(t,e){return t.match(o("definitionList")),e.layoutType="definitionList",t.match(/\s*$/)?e.spanningLayout=!0:e.mode=c.attributes,i(e)},html:function(t,e){return t.skipToEnd(),r(e,u.html)},table:function(t,e){return e.layoutType="table",(e.mode=c.tableCell)(t,e)},tableCell:function(t,e){return t.match(o("tableHeading"))?e.tableHeading=!0:t.eat("|"),e.mode=c.tableCellAttributes,i(e)},tableCellAttributes:function(t,e){return e.mode=c.tableText,t.match(o("tableCellAttributes"))?r(e,u.attributes):i(e)},tableText:function(t,n){return t.match(o("tableText"))?i(n):"|"===t.peek()?(n.mode=c.tableCell,i(n)):e(t,n,t.next())}};t.defineMode("textile",function(){return{startState:function(){return{mode:c.newLayout}},token:function(t,e){return t.sol()&&function(t,e){e.mode=c.newLayout,e.tableHeading=!1,"definitionList"===e.layoutType&&e.spanningLayout&&t.match(o("definitionListEnd"),!1)&&(e.spanningLayout=!1)}(t,e),e.mode(t,e)},blankLine:l}}),t.defineMIME("text/x-textile","textile")});

No other release has this exact content. See every version of this file.