mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2025-09-07 13:28:01 +00:00
Bump codemirror 5 plugin version to 5.65.19 (#9114)
* Bump codemirror 5 plugin version to 5.65.19 * Update autocomplete * Update closebrackets * Update fullscreen * Update keymap * Update modes * Update search * Update trailingspace * Fix broken markdown mode * Add all codemirror plugins to codemirrordemo edition
This commit is contained in:
@@ -11,6 +11,7 @@ The ~CodeMirror plugin can be extended with ~AddOns for more functionality:
|
||||
* Keymaps in the style of Emacs, Sublime Text or Vim
|
||||
* Closing Brackets
|
||||
* Closing Tags
|
||||
* Display trailing whitespace
|
||||
|
||||
NOTE: This demo has the ''Sublime Text'' keymap installed.
|
||||
|
||||
|
@@ -8,11 +8,16 @@
|
||||
"tiddlywiki/codemirror-search-replace",
|
||||
"tiddlywiki/codemirror-fullscreen-editing",
|
||||
"tiddlywiki/codemirror-mode-xml",
|
||||
"tiddlywiki/codemirror-mode-htmlembedded",
|
||||
"tiddlywiki/codemirror-mode-htmlmixed",
|
||||
"tiddlywiki/codemirror-mode-javascript",
|
||||
"tiddlywiki/codemirror-mode-css",
|
||||
"tiddlywiki/codemirror-mode-x-tiddlywiki",
|
||||
"tiddlywiki/codemirror-mode-markdown",
|
||||
"tiddlywiki/codemirror-keymap-sublime-text"
|
||||
"tiddlywiki/codemirror-trailingspace",
|
||||
"tiddlywiki/codemirror-keymap-emacs",
|
||||
"tiddlywiki/codemirror-keymap-sublime-text",
|
||||
"tiddlywiki/codemirror-keymap-vim"
|
||||
],
|
||||
"themes": [
|
||||
"tiddlywiki/vanilla",
|
||||
|
@@ -1,3 +1 @@
|
||||
// CodeMirror, copyright (c) by Marijn Haverbeke and others
|
||||
// Distributed under an MIT license: https://codemirror.net/LICENSE
|
||||
!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(y){"use strict";var b=/[\w$]+/;y.registerHelper("hint","anyword",function(e,r){for(var t=r&&r.word||b,o=r&&r.range||500,i=e.getCursor(),n=e.getLine(i.line),f=i.ch,s=f;s&&t.test(n.charAt(s-1));)--s;for(var a=s!=f&&n.slice(s,f),c=r&&r.list||[],l={},d=new RegExp(t.source,"g"),u=-1;u<=1;u+=2)for(var p=i.line,g=Math.min(Math.max(p+u*o,e.firstLine()),e.lastLine())+u;p!=g;p+=u)for(var h,m=e.getLine(p);h=d.exec(m);)p==i.line&&h[0]===a||a&&0!=h[0].lastIndexOf(a,0)||Object.prototype.hasOwnProperty.call(l,h[0])||(l[h[0]]=!0,c.push(h[0]));return{list:c,from:y.Pos(i.line,s),to:y.Pos(i.line,f)}})});
|
||||
!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(y){"use strict";var b=/[\w$]+/;y.registerHelper("hint","anyword",function(e,r){for(var t=r&&r.word||b,o=r&&r.range||500,i=e.getCursor(),n=e.getLine(i.line),f=i.ch,s=f;s&&t.test(n.charAt(s-1));)--s;for(var a=s!=f&&n.slice(s,f),c=r&&r.list||[],l={},d=new RegExp(t.source,"g"),u=-1;u<=1;u+=2)for(var p=i.line,g=Math.min(Math.max(p+u*o,e.firstLine()),e.lastLine())+u;p!=g;p+=u)for(var h,m=e.getLine(p);h=d.exec(m);)p==i.line&&h[0]===a||a&&0!=h[0].lastIndexOf(a,0)||Object.prototype.hasOwnProperty.call(l,h[0])||(l[h[0]]=!0,c.push(h[0]));return{list:c,from:y.Pos(i.line,s),to:y.Pos(i.line,f)}})});
|
@@ -1,3 +1 @@
|
||||
// CodeMirror, copyright (c) by Marijn Haverbeke and others
|
||||
// Distributed under an MIT license: https://codemirror.net/LICENSE
|
||||
!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror"),require("../../mode/css/css")):"function"==typeof define&&define.amd?define(["../../lib/codemirror","../../mode/css/css"],e):e(CodeMirror)}(function(f){"use strict";var p={active:1,after:1,before:1,checked:1,default:1,disabled:1,empty:1,enabled:1,"first-child":1,"first-letter":1,"first-line":1,"first-of-type":1,focus:1,hover:1,"in-range":1,indeterminate:1,invalid:1,lang:1,"last-child":1,"last-of-type":1,link:1,not:1,"nth-child":1,"nth-last-child":1,"nth-last-of-type":1,"nth-of-type":1,"only-of-type":1,"only-child":1,optional:1,"out-of-range":1,placeholder:1,"read-only":1,"read-write":1,required:1,root:1,selection:1,target:1,valid:1,visited:1};f.registerHelper("hint","css",function(e){var t=e.getCursor(),r=e.getTokenAt(t),o=f.innerMode(e.getMode(),r.state);if("css"==o.mode.name){if("keyword"==r.type&&0=="!important".indexOf(r.string))return{list:["!important"],from:f.Pos(t.line,r.start),to:f.Pos(t.line,r.end)};var i=r.start,s=t.ch,n=r.string.slice(0,s-i);/[^\w$_-]/.test(n)&&(n="",i=s=t.ch);var a=f.resolveMode("text/css"),d=[],l=o.state.state;return"pseudo"==l||"variable-3"==r.type?c(p):"block"==l||"maybeprop"==l?c(a.propertyKeywords):"prop"==l||"parens"==l||"at"==l||"params"==l?(c(a.valueKeywords),c(a.colorKeywords)):"media"!=l&&"media_parens"!=l||(c(a.mediaTypes),c(a.mediaFeatures)),d.length?{list:d,from:f.Pos(t.line,i),to:f.Pos(t.line,s)}:void 0}function c(e){for(var t in e)n&&0!=t.lastIndexOf(n,0)||d.push(t)}})});
|
||||
!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror"),require("../../mode/css/css")):"function"==typeof define&&define.amd?define(["../../lib/codemirror","../../mode/css/css"],e):e(CodeMirror)}(function(l){"use strict";var c={active:1,after:1,before:1,checked:1,default:1,disabled:1,empty:1,enabled:1,"first-child":1,"first-letter":1,"first-line":1,"first-of-type":1,focus:1,hover:1,"in-range":1,indeterminate:1,invalid:1,lang:1,"last-child":1,"last-of-type":1,link:1,not:1,"nth-child":1,"nth-last-child":1,"nth-last-of-type":1,"nth-of-type":1,"only-of-type":1,"only-child":1,optional:1,"out-of-range":1,placeholder:1,"read-only":1,"read-write":1,required:1,root:1,selection:1,target:1,valid:1,visited:1};l.registerHelper("hint","css",function(e){var t=e.getCursor(),r=e.getTokenAt(t),e=l.innerMode(e.getMode(),r.state);if("css"==e.mode.name){if("keyword"==r.type&&0=="!important".indexOf(r.string))return{list:["!important"],from:l.Pos(t.line,r.start),to:l.Pos(t.line,r.end)};var o=r.start,i=t.ch,s=r.string.slice(0,i-o),n=(/[^\w$_-]/.test(s)&&(s="",o=i=t.ch),l.resolveMode("text/css")),a=[],e=e.state.state;return"pseudo"==e||"variable-3"==r.type?d(c):"block"==e||"maybeprop"==e?d(n.propertyKeywords):"prop"==e||"parens"==e||"at"==e||"params"==e?(d(n.valueKeywords),d(n.colorKeywords)):"media"!=e&&"media_parens"!=e||(d(n.mediaTypes),d(n.mediaFeatures)),a.length?{list:a,from:l.Pos(t.line,o),to:l.Pos(t.line,i)}:void 0}function d(e){for(var t in e)s&&0!=t.lastIndexOf(s,0)||a.push(t)}})});
|
File diff suppressed because one or more lines are too long
@@ -1,3 +1 @@
|
||||
// CodeMirror, copyright (c) by Marijn Haverbeke and others
|
||||
// Distributed under an MIT license: https://codemirror.net/LICENSE
|
||||
!function(t){"object"==typeof exports&&"object"==typeof module?t(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],t):t(CodeMirror)}(function(f){var c=f.Pos;function g(t,e){for(var r=0,n=t.length;r<n;++r)e(t[r])}function r(t,e,r,n){var i=t.getCursor(),o=r(t,i);if(!/\b(?:string|comment)\b/.test(o.type)){var s=f.innerMode(t.getMode(),o.state);if("json"!==s.mode.helperType){o.state=s.state,/^[\w$_]*$/.test(o.string)?o.end>i.ch&&(o.end=i.ch,o.string=o.string.slice(0,i.ch-o.start)):o={start:i.ch,end:i.ch,string:"",state:o.state,type:"."==o.string?"property":null};for(var a=o;"property"==a.type;){if("."!=(a=r(t,c(i.line,a.start))).string)return;a=r(t,c(i.line,a.start));var l=l||[];l.push(a)}return{list:function(t,e,r,n){var i=[],o=t.string,s=n&&n.globalScope||window;function a(t){0!=t.lastIndexOf(o,0)||function(t,e){if(Array.prototype.indexOf)return-1!=t.indexOf(e);for(var r=t.length;r--;)if(t[r]===e)return 1}(i,t)||i.push(t)}function l(t){"string"==typeof t?g(y,a):t instanceof Array?g(h,a):t instanceof Function&&g(v,a),function(t,e){if(Object.getOwnPropertyNames&&Object.getPrototypeOf)for(var r=t;r;r=Object.getPrototypeOf(r))Object.getOwnPropertyNames(r).forEach(e);else for(var n in t)e(n)}(t,a)}if(e&&e.length){var f,c=e.pop();for(c.type&&0===c.type.indexOf("variable")?(n&&n.additionalContext&&(f=n.additionalContext[c.string]),n&&!1===n.useGlobalScope||(f=f||s[c.string])):"string"==c.type?f="":"atom"==c.type?f=1:"function"==c.type&&(null==s.jQuery||"$"!=c.string&&"jQuery"!=c.string||"function"!=typeof s.jQuery?null!=s._&&"_"==c.string&&"function"==typeof s._&&(f=s._()):f=s.jQuery());null!=f&&e.length;)f=f[e.pop().string];null!=f&&l(f)}else{for(var p=t.state.localVars;p;p=p.next)a(p.name);for(var u=t.state.context;u;u=u.prev)for(p=u.vars;p;p=p.next)a(p.name);for(p=t.state.globalVars;p;p=p.next)a(p.name);if(n&&null!=n.additionalContext)for(var d in n.additionalContext)a(d);n&&!1===n.useGlobalScope||l(s),g(r,a)}return i}(o,l,e,n),from:c(i.line,o.start),to:c(i.line,o.end)}}}}function n(t,e){var r=t.getTokenAt(e);return e.ch==r.start+1&&"."==r.string.charAt(0)?(r.end=r.start,r.string=".",r.type="property"):/^\.[\w$_]*$/.test(r.string)&&(r.type="property",r.start++,r.string=r.string.replace(/\./,"")),r}f.registerHelper("hint","javascript",function(t,e){return r(t,i,function(t,e){return t.getTokenAt(e)},e)}),f.registerHelper("hint","coffeescript",function(t,e){return r(t,o,n,e)});var y="charAt charCodeAt indexOf lastIndexOf substring substr slice trim trimLeft trimRight toUpperCase toLowerCase split concat match replace search".split(" "),h="length concat join splice push pop shift unshift slice reverse sort indexOf lastIndexOf every some filter forEach map reduce reduceRight ".split(" "),v="prototype apply call bind".split(" "),i="break case catch class const continue debugger default delete do else export extends false finally for function if in import instanceof new null return super switch this throw true try typeof var void while with yield".split(" "),o="and break catch class continue delete do else extends false finally for if in instanceof isnt new no not null of off on or return switch then throw true try typeof until void while with yes".split(" ")});
|
||||
!function(t){"object"==typeof exports&&"object"==typeof module?t(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],t):t(CodeMirror)}(function(f){var c=f.Pos;function g(t,e){for(var r=0,n=t.length;r<n;++r)e(t[r])}function r(t,e,r,n){var i=t.getCursor(),o=r(t,i);if(!/\b(?:string|comment)\b/.test(o.type)){var s=f.innerMode(t.getMode(),o.state);if("json"!==s.mode.helperType){o.state=s.state,/^[\w$_]*$/.test(o.string)?o.end>i.ch&&(o.end=i.ch,o.string=o.string.slice(0,i.ch-o.start)):o={start:i.ch,end:i.ch,string:"",state:o.state,type:"."==o.string?"property":null};for(var a=o;"property"==a.type;){if("."!=(a=r(t,c(i.line,a.start))).string)return;var a=r(t,c(i.line,a.start)),l=l||[];l.push(a)}return{list:function(t,e,r,n){var i=[],o=t.string,s=n&&n.globalScope||window;function a(t){0!=t.lastIndexOf(o,0)||function(t,e){if(Array.prototype.indexOf)return-1!=t.indexOf(e);for(var r=t.length;r--;)if(t[r]===e)return 1}(i,t)||i.push(t)}function l(t){"string"==typeof t?g(y,a):t instanceof Array?g(h,a):t instanceof Function&&g(v,a);var e=a;if(Object.getOwnPropertyNames&&Object.getPrototypeOf)for(var r=t;r;r=Object.getPrototypeOf(r))Object.getOwnPropertyNames(r).forEach(e);else for(var n in t)e(n)}if(e&&e.length){var f,c=e.pop();for(c.type&&0===c.type.indexOf("variable")?(n&&n.additionalContext&&(f=n.additionalContext[c.string]),n&&!1===n.useGlobalScope||(f=f||s[c.string])):"string"==c.type?f="":"atom"==c.type?f=1:"function"==c.type&&(null==s.jQuery||"$"!=c.string&&"jQuery"!=c.string||"function"!=typeof s.jQuery?null!=s._&&"_"==c.string&&"function"==typeof s._&&(f=s._()):f=s.jQuery());null!=f&&e.length;)f=f[e.pop().string];null!=f&&l(f)}else{for(var p=t.state.localVars;p;p=p.next)a(p.name);for(var u=t.state.context;u;u=u.prev)for(p=u.vars;p;p=p.next)a(p.name);for(p=t.state.globalVars;p;p=p.next)a(p.name);if(n&&null!=n.additionalContext)for(var d in n.additionalContext)a(d);n&&!1===n.useGlobalScope||l(s),g(r,a)}return i}(o,l,e,n),from:c(i.line,o.start),to:c(i.line,o.end)}}}}function n(t,e){t=t.getTokenAt(e);return e.ch==t.start+1&&"."==t.string.charAt(0)?(t.end=t.start,t.string=".",t.type="property"):/^\.[\w$_]*$/.test(t.string)&&(t.type="property",t.start++,t.string=t.string.replace(/\./,"")),t}f.registerHelper("hint","javascript",function(t,e){return r(t,i,function(t,e){return t.getTokenAt(e)},e)}),f.registerHelper("hint","coffeescript",function(t,e){return r(t,o,n,e)});var y="charAt charCodeAt indexOf lastIndexOf substring substr slice trim trimLeft trimRight toUpperCase toLowerCase split concat match replace search".split(" "),h="length concat join splice push pop shift unshift slice reverse sort indexOf lastIndexOf every some filter forEach map reduce reduceRight ".split(" "),v="prototype apply call bind".split(" "),i="break case catch class const continue debugger default delete do else export extends false finally for function if in import instanceof new null return super switch this throw true try typeof var void while with yield".split(" "),o="and break catch class continue delete do else extends false finally for if in instanceof isnt new no not null of off on or return switch then throw true try typeof until void while with yes".split(" ")});
|
@@ -1,36 +1 @@
|
||||
.CodeMirror-hints {
|
||||
position: absolute;
|
||||
z-index: 10;
|
||||
overflow: hidden;
|
||||
list-style: none;
|
||||
|
||||
margin: 0;
|
||||
padding: 2px;
|
||||
|
||||
-webkit-box-shadow: 2px 3px 5px rgba(0,0,0,.2);
|
||||
-moz-box-shadow: 2px 3px 5px rgba(0,0,0,.2);
|
||||
box-shadow: 2px 3px 5px rgba(0,0,0,.2);
|
||||
border-radius: 3px;
|
||||
border: 1px solid silver;
|
||||
|
||||
background: white;
|
||||
font-size: 90%;
|
||||
font-family: monospace;
|
||||
|
||||
max-height: 20em;
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
.CodeMirror-hint {
|
||||
margin: 0;
|
||||
padding: 0 4px;
|
||||
border-radius: 2px;
|
||||
white-space: pre;
|
||||
color: black;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
li.CodeMirror-hint-active {
|
||||
background: #08f;
|
||||
color: white;
|
||||
}
|
||||
.CodeMirror-hints{position:absolute;z-index:10;overflow:hidden;list-style:none;margin:0;padding:2px;-webkit-box-shadow:2px 3px 5px rgba(0,0,0,.2);-moz-box-shadow:2px 3px 5px rgba(0,0,0,.2);box-shadow:2px 3px 5px rgba(0,0,0,.2);border-radius:3px;border:1px solid silver;background:#fff;font-size:90%;font-family:monospace;max-height:20em;overflow-y:auto;box-sizing:border-box}.CodeMirror-hint{margin:0;padding:0 4px;border-radius:2px;white-space:pre;color:#000;cursor:pointer}li.CodeMirror-hint-active{background:#08f;color:#fff}
|
File diff suppressed because one or more lines are too long
@@ -1,3 +1 @@
|
||||
// CodeMirror, copyright (c) by Marijn Haverbeke and others
|
||||
// Distributed under an MIT license: https://codemirror.net/LICENSE
|
||||
!function(t){"object"==typeof exports&&"object"==typeof module?t(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],t):t(CodeMirror)}(function(H){"use strict";var R=H.Pos;function z(t,e,r){return r?0<=t.indexOf(e):0==t.lastIndexOf(e,0)}H.registerHelper("hint","xml",function(t,e){var r=e&&e.schemaInfo,n=e&&e.quoteChar||'"',s=e&&e.matchInMiddle;if(r){var i=t.getCursor(),o=t.getTokenAt(i);if(o.end>i.ch&&(o.end=i.ch,o.string=o.string.slice(0,i.ch-o.start)),(p=H.innerMode(t.getMode(),o.state)).mode.xmlCurrentTag){var a,l,g,c=[],f=!1,h=/\btag\b/.test(o.type)&&!/>$/.test(o.string),u=h&&/^\w/.test(o.string);u?(M=t.getLine(i.line).slice(Math.max(0,o.start-2),o.start),(g=/<\/$/.test(M)?"close":/<$/.test(M)?"open":null)&&(l=o.start-("close"==g?2:1))):h&&"<"==o.string?g="open":h&&"</"==o.string&&(g="close");var d=p.mode.xmlCurrentTag(p.state);if(!h&&!d||g){u&&(a=o.string),f=g;var p,m=p.mode.xmlCurrentContext?p.mode.xmlCurrentContext(p.state):[],v=(p=m.length&&m[m.length-1])&&r[p],y=p?v&&v.children:r["!top"];if(y&&"close"!=g)for(var x=0;x<y.length;++x)a&&!z(y[x],a,s)||c.push("<"+y[x]);else if("close"!=g)for(var C in r)!r.hasOwnProperty(C)||"!top"==C||"!attrs"==C||a&&!z(C,a,s)||c.push("<"+C);p&&(!a||"close"==g&&z(p,a,s))&&c.push("</"+p+">")}else{var b=(v=d&&r[d.name])&&v.attrs,O=r["!attrs"];if(!b&&!O)return;if(b){if(O){var w={};for(var A in O)O.hasOwnProperty(A)&&(w[A]=O[A]);for(var A in b)b.hasOwnProperty(A)&&(w[A]=b[A]);b=w}}else b=O;if("string"==o.type||"="==o.string){var M,P,$,I,T,j=(M=t.getRange(R(i.line,Math.max(0,i.ch-60)),R(i.line,"string"==o.type?o.start:o.end))).match(/([^\s\u00a0=<>\"\']+)=$/);if(!j||!b.hasOwnProperty(j[1])||!(P=b[j[1]]))return;"function"==typeof P&&(P=P.call(this,t)),"string"==o.type&&(a=o.string,$=0,/['"]/.test(o.string.charAt(0))&&(n=o.string.charAt(0),a=o.string.slice(1),$++),I=o.string.length,/['"]/.test(o.string.charAt(I-1))&&(n=o.string.charAt(I-1),a=o.string.substr($,I-2)),!$||(T=t.getLine(i.line)).length>o.end&&T.charAt(o.end)==n&&o.end++,f=!0);var q=function(t){if(t)for(var e=0;e<t.length;++e)a&&!z(t[e],a,s)||c.push(n+t[e]+n);return k()};return P&&P.then?P.then(q):q(P)}for(var L in"attribute"==o.type&&(a=o.string,f=!0),b)!b.hasOwnProperty(L)||a&&!z(L,a,s)||c.push(L)}return k()}}function k(){return{list:c,from:f?R(i.line,null==l?o.start:l):i,to:f?R(i.line,o.end):i}}})});
|
||||
!function(t){"object"==typeof exports&&"object"==typeof module?t(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],t):t(CodeMirror)}(function($){"use strict";var I=$.Pos;function T(t,e,r){return r?0<=t.indexOf(e):0==t.lastIndexOf(e,0)}$.registerHelper("hint","xml",function(t,e){var r=e&&e.schemaInfo,n=e&&e.quoteChar||'"',s=e&&e.matchInMiddle;if(r){var i=t.getCursor(),o=t.getTokenAt(i);if(o.end>i.ch&&(o.end=i.ch,o.string=o.string.slice(0,i.ch-o.start)),(e=$.innerMode(t.getMode(),o.state)).mode.xmlCurrentTag){var a,l=[],g=!1,c=/\btag\b/.test(o.type)&&!/>$/.test(o.string),f=c&&/^\w/.test(o.string),h=(f?(O=t.getLine(i.line).slice(Math.max(0,o.start-2),o.start),(M=/<\/$/.test(O)?"close":/<$/.test(O)?"open":null)&&(a=o.start-("close"==M?2:1))):c&&"<"==o.string?M="open":c&&"</"==o.string&&(M="close"),e.mode.xmlCurrentTag(e.state));if(!c&&!h||M){f&&(A=o.string);var g=M,c=e.mode.xmlCurrentContext?e.mode.xmlCurrentContext(e.state):[],u=(e=c.length&&c[c.length-1])&&r[e],d=e?u&&u.children:r["!top"];if(d&&"close"!=M)for(var p=0;p<d.length;++p)A&&!T(d[p],A,s)||l.push("<"+d[p]);else if("close"!=M)for(var m in r)!r.hasOwnProperty(m)||"!top"==m||"!attrs"==m||A&&!T(m,A,s)||l.push("<"+m);e&&(!A||"close"==M&&T(e,A,s))&&l.push("</"+e+">")}else{var y,x=(u=h&&r[h.name])&&u.attrs,v=r["!attrs"];if(!x&&!v)return;if(x){if(v){var C,b={};for(C in v)v.hasOwnProperty(C)&&(b[C]=v[C]);for(C in x)x.hasOwnProperty(C)&&(b[C]=x[C]);x=b}}else x=v;if("string"==o.type||"="==o.string){var O,w,A,M,f=(O=t.getRange(I(i.line,Math.max(0,i.ch-60)),I(i.line,"string"==o.type?o.start:o.end))).match(/([^\s\u00a0=<>\"\']+)=$/);if(!f||!x.hasOwnProperty(f[1])||!(w=x[f[1]]))return;"function"==typeof w&&(w=w.call(this,t)),"string"==o.type&&(A=o.string,/['"]/.test(o.string.charAt(c=0))&&(n=o.string.charAt(0),A=o.string.slice(1),c++),M=o.string.length,/['"]/.test(o.string.charAt(M-1))&&(n=o.string.charAt(M-1),A=o.string.substr(c,M-2)),c&&(e=t.getLine(i.line)).length>o.end&&e.charAt(o.end)==n&&o.end++,g=!0);h=function(t){if(t)for(var e=0;e<t.length;++e)A&&!T(t[e],A,s)||l.push(n+t[e]+n);return P()};return w&&w.then?w.then(h):h(w)}for(y in"attribute"==o.type&&(A=o.string,g=!0),x)!x.hasOwnProperty(y)||A&&!T(y,A,s)||l.push(y)}return P()}}function P(){return{list:l,from:g?I(i.line,null==a?o.start:a):i,to:g?I(i.line,o.end):i}}})});
|
@@ -1,3 +1 @@
|
||||
// CodeMirror, copyright (c) by Marijn Haverbeke and others
|
||||
// Distributed under an MIT license: https://codemirror.net/LICENSE
|
||||
!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(C){var r={pairs:"()[]{}''\"\"",closeBefore:")]}'\":;>",triples:"",explode:"[]{}"},x=C.Pos;function P(e,t){return"pairs"==t&&"string"==typeof e?e:"object"==typeof e&&null!=e[t]?e[t]:r[t]}C.defineOption("autoCloseBrackets",!1,function(e,t,r){r&&r!=C.Init&&(e.removeKeyMap(i),e.state.closeBrackets=null),t&&(n(P(t,"pairs")),e.state.closeBrackets=t,e.addKeyMap(i))});var i={Backspace:function(e){var t=k(e);if(!t||e.getOption("disableInput"))return C.Pass;for(var r=P(t,"pairs"),n=e.listSelections(),i=0;i<n.length;i++){if(!n[i].empty())return C.Pass;var a=s(e,n[i].head);if(!a||r.indexOf(a)%2!=0)return C.Pass}for(i=n.length-1;0<=i;i--){var o=n[i].head;e.replaceRange("",x(o.line,o.ch-1),x(o.line,o.ch+1),"+delete")}},Enter:function(n){var e=k(n),t=e&&P(e,"explode");if(!t||n.getOption("disableInput"))return C.Pass;for(var i=n.listSelections(),r=0;r<i.length;r++){if(!i[r].empty())return C.Pass;var a=s(n,i[r].head);if(!a||t.indexOf(a)%2!=0)return C.Pass}n.operation(function(){var e=n.lineSeparator()||"\n";n.replaceSelection(e+e,null),n.execCommand("goCharLeft"),i=n.listSelections();for(var t=0;t<i.length;t++){var r=i[t].head.line;n.indentLine(r,null,!0),n.indentLine(r+1,null,!0)}})}};function n(e){for(var t=0;t<e.length;t++){var r=e.charAt(t),n="'"+r+"'";i[n]||(i[n]=function(t){return function(e){return function(i,e){var t=k(i);if(!t||i.getOption("disableInput"))return C.Pass;var r=P(t,"pairs"),n=r.indexOf(e);if(-1==n)return C.Pass;for(var a,o=P(t,"closeBefore"),s=P(t,"triples"),l=r.charAt(n+1)==e,c=i.listSelections(),f=n%2==0,h=0;h<c.length;h++){var u,d=c[h],p=d.head,g=i.getRange(p,x(p.line,p.ch+1));if(f&&!d.empty())u="surround";else if(!l&&f||g!=e)if(l&&1<p.ch&&0<=s.indexOf(e)&&i.getRange(x(p.line,p.ch-2),p)==e+e){if(2<p.ch&&/\bstring/.test(i.getTokenTypeAt(x(p.line,p.ch-2))))return C.Pass;u="addFour"}else if(l){var v=0==p.ch?" ":i.getRange(x(p.line,p.ch-1),p);if(C.isWordChar(g)||v==e||C.isWordChar(v))return C.Pass;u="both"}else{if(!f||!(0===g.length||/\s/.test(g)||-1<o.indexOf(g)))return C.Pass;u="both"}else u=l&&function(e,t){var r=e.getTokenAt(x(t.line,t.ch+1));return/\bstring/.test(r.type)&&r.start==t.ch&&(0==t.ch||!/\bstring/.test(e.getTokenTypeAt(t)))}(i,p)?"both":0<=s.indexOf(e)&&i.getRange(p,x(p.line,p.ch+3))==e+e+e?"skipThree":"skip";if(a){if(a!=u)return C.Pass}else a=u}var m=n%2?r.charAt(n-1):e,b=n%2?e:r.charAt(n+1);i.operation(function(){if("skip"==a)i.execCommand("goCharRight");else if("skipThree"==a)for(var e=0;e<3;e++)i.execCommand("goCharRight");else if("surround"==a){for(var t=i.getSelections(),e=0;e<t.length;e++)t[e]=m+t[e]+b;i.replaceSelections(t,"around"),t=i.listSelections().slice();for(e=0;e<t.length;e++)t[e]=(r=t[e],n=0<C.cmpPos(r.anchor,r.head),{anchor:new x(r.anchor.line,r.anchor.ch+(n?-1:1)),head:new x(r.head.line,r.head.ch+(n?1:-1))});i.setSelections(t)}else"both"==a?(i.replaceSelection(m+b,null),i.triggerElectric(m+b),i.execCommand("goCharLeft")):"addFour"==a&&(i.replaceSelection(m+m+m+m,"before"),i.execCommand("goCharRight"));var r,n})}(e,t)}}(r))}}function k(e){var t=e.state.closeBrackets;return t&&!t.override&&e.getModeAt(e.getCursor()).closeBrackets||t}function s(e,t){var r=e.getRange(x(t.line,t.ch-1),x(t.line,t.ch+1));return 2==r.length?r:null}n(r.pairs+"`")});
|
||||
!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(S){var n={pairs:"()[]{}''\"\"",closeBefore:")]}'\":;>",triples:"",explode:"[]{}"},k=S.Pos;function y(e,t){return"pairs"==t&&"string"==typeof e?e:("object"==typeof e&&null!=e[t]?e:n)[t]}S.defineOption("autoCloseBrackets",!1,function(e,t,n){n&&n!=S.Init&&(e.removeKeyMap(i),e.state.closeBrackets=null),t&&(r(y(t,"pairs")),e.state.closeBrackets=t,e.addKeyMap(i))});var i={Backspace:function(e){var t=O(e);if(!t||e.getOption("disableInput"))return S.Pass;for(var n=y(t,"pairs"),r=e.listSelections(),i=0;i<r.length;i++){if(!r[i].empty())return S.Pass;var a=s(e,r[i].head);if(!a||n.indexOf(a)%2!=0)return S.Pass}for(i=r.length-1;0<=i;i--){var o=r[i].head;e.replaceRange("",k(o.line,o.ch-1),k(o.line,o.ch+1),"+delete")}},Enter:function(r){var e=O(r),t=e&&y(e,"explode");if(!t||r.getOption("disableInput"))return S.Pass;for(var i=r.listSelections(),n=0;n<i.length;n++){if(!i[n].empty())return S.Pass;var a=s(r,i[n].head);if(!a||t.indexOf(a)%2!=0)return S.Pass}r.operation(function(){var e=r.lineSeparator()||"\n";r.replaceSelection(e+e,null),m(r,-1),i=r.listSelections();for(var t=0;t<i.length;t++){var n=i[t].head.line;r.indentLine(n,null,!0),r.indentLine(n+1,null,!0)}})}};function r(e){for(var t=0;t<e.length;t++){var n=e.charAt(t),r="'"+n+"'";i[r]||(i[r]=function(P){return function(e){var i=e,t=P,e=O(i);if(!e||i.getOption("disableInput"))return S.Pass;var n=y(e,"pairs"),r=n.indexOf(t);if(-1==r)return S.Pass;for(var a,o=y(e,"closeBefore"),s=y(e,"triples"),l=n.charAt(r+1)==t,c=i.listSelections(),h=r%2==0,f=0;f<c.length;f++){var u,d=c[f],p=d.head,g=i.getRange(p,k(p.line,p.ch+1));if(h&&!d.empty())u="surround";else if(!l&&h||g!=t)if(l&&1<p.ch&&0<=s.indexOf(t)&&i.getRange(k(p.line,p.ch-2),p)==t+t){if(2<p.ch&&/\bstring/.test(i.getTokenTypeAt(k(p.line,p.ch-2))))return S.Pass;u="addFour"}else if(l){d=0==p.ch?" ":i.getRange(k(p.line,p.ch-1),p);if(S.isWordChar(g)||d==t||S.isWordChar(d))return S.Pass;u="both"}else{if(!h||!(0===g.length||/\s/.test(g)||-1<o.indexOf(g)))return S.Pass;u="both"}else u=l&&function(e,t){var n=e.getTokenAt(k(t.line,t.ch+1));return/\bstring/.test(n.type)&&n.start==t.ch&&(0==t.ch||!/\bstring/.test(e.getTokenTypeAt(t)))}(i,p)?"both":0<=s.indexOf(t)&&i.getRange(p,k(p.line,p.ch+3))==t+t+t?"skipThree":"skip";if(a){if(a!=u)return S.Pass}else a=u}var v=r%2?n.charAt(r-1):t,b=r%2?t:n.charAt(r+1);i.operation(function(){if("skip"==a)m(i,1);else if("skipThree"==a)m(i,3);else if("surround"==a){for(var e=i.getSelections(),t=0;t<e.length;t++)e[t]=v+e[t]+b;i.replaceSelections(e,"around");for(e=i.listSelections().slice(),t=0;t<e.length;t++)e[t]=(n=e[t],r=void 0,r=0<S.cmpPos(n.anchor,n.head),{anchor:new k(n.anchor.line,n.anchor.ch+(r?-1:1)),head:new k(n.head.line,n.head.ch+(r?1:-1))});i.setSelections(e)}else"both"==a?(i.replaceSelection(v+b,null),i.triggerElectric(v+b),m(i,-1)):"addFour"==a&&(i.replaceSelection(v+v+v+v,"before"),m(i,1));var n,r})}}(n))}}function O(e){var t=e.state.closeBrackets;return t&&!t.override&&e.getModeAt(e.getCursor()).closeBrackets||t}function m(e,t){for(var n=[],r=e.listSelections(),i=0,a=0;a<r.length;a++){var o=r[a],o=(o.head==e.getCursor()&&(i=a),o.head.ch||0<t?{line:o.head.line,ch:o.head.ch+t}:{line:o.head.line-1});n.push({anchor:o,head:o})}e.setSelections(n,i)}function s(e,t){e=e.getRange(k(t.line,t.ch-1),k(t.line,t.ch+1));return 2==e.length?e:null}r(n.pairs+"`")});
|
@@ -1,3 +1 @@
|
||||
// CodeMirror, copyright (c) by Marijn Haverbeke and others
|
||||
// Distributed under an MIT license: https://codemirror.net/LICENSE
|
||||
!function(t){"object"==typeof exports&&"object"==typeof module?t(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],t):t(CodeMirror)}(function(i){var h=/MSIE \d/.test(navigator.userAgent)&&(null==document.documentMode||document.documentMode<8),k=i.Pos,p={"(":")>",")":"(<","[":"]>","]":"[<","{":"}>","}":"{<","<":">>",">":"<<"};function v(t){return t&&t.bracketRegex||/[(){}[\]]/}function u(t,e,n){var r=t.getLineHandle(e.line),i=e.ch-1,c=n&&n.afterCursor;null==c&&(c=/(^| )cm-fat-cursor($| )/.test(t.getWrapperElement().className));var a=v(n),o=!c&&0<=i&&a.test(r.text.charAt(i))&&p[r.text.charAt(i)]||a.test(r.text.charAt(i+1))&&p[r.text.charAt(++i)];if(!o)return null;var l=">"==o.charAt(1)?1:-1;if(n&&n.strict&&0<l!=(i==e.ch))return null;var s=t.getTokenTypeAt(k(e.line,i+1)),h=f(t,k(e.line,i+(0<l?1:0)),l,s||null,n);return null==h?null:{from:k(e.line,i),to:h&&h.pos,match:h&&h.ch==o.charAt(0),forward:0<l}}function f(t,e,n,r,i){for(var c=i&&i.maxScanLineLength||1e4,a=i&&i.maxScanLines||1e3,o=[],l=v(i),s=0<n?Math.min(e.line+a,t.lastLine()+1):Math.max(t.firstLine()-1,e.line-a),h=e.line;h!=s;h+=n){var u=t.getLine(h);if(u){var f=0<n?0:u.length-1,m=0<n?u.length:-1;if(!(u.length>c))for(h==e.line&&(f=e.ch-(n<0?1:0));f!=m;f+=n){var g=u.charAt(f);if(l.test(g)&&(void 0===r||t.getTokenTypeAt(k(h,f+1))==r)){var d=p[g];if(d&&">"==d.charAt(1)==0<n)o.push(g);else{if(!o.length)return{pos:k(h,f),ch:g};o.pop()}}}}}return h-n!=(0<n?t.lastLine():t.firstLine())&&null}function e(t,e,n){for(var r=t.state.matchBrackets.maxHighlightLineLength||1e3,i=[],c=t.listSelections(),a=0;a<c.length;a++){var o,l=c[a].empty()&&u(t,c[a].head,n);l&&t.getLine(l.from.line).length<=r&&(o=l.match?"CodeMirror-matchingbracket":"CodeMirror-nonmatchingbracket",i.push(t.markText(l.from,k(l.from.line,l.from.ch+1),{className:o})),l.to&&t.getLine(l.to.line).length<=r&&i.push(t.markText(l.to,k(l.to.line,l.to.ch+1),{className:o})))}if(i.length){h&&t.state.focused&&t.focus();function s(){t.operation(function(){for(var t=0;t<i.length;t++)i[t].clear()})}if(!e)return s;setTimeout(s,800)}}function c(t){t.operation(function(){t.state.matchBrackets.currentlyHighlighted&&(t.state.matchBrackets.currentlyHighlighted(),t.state.matchBrackets.currentlyHighlighted=null),t.state.matchBrackets.currentlyHighlighted=e(t,!1,t.state.matchBrackets)})}i.defineOption("matchBrackets",!1,function(t,e,n){function r(t){t.state.matchBrackets&&t.state.matchBrackets.currentlyHighlighted&&(t.state.matchBrackets.currentlyHighlighted(),t.state.matchBrackets.currentlyHighlighted=null)}n&&n!=i.Init&&(t.off("cursorActivity",c),t.off("focus",c),t.off("blur",r),r(t)),e&&(t.state.matchBrackets="object"==typeof e?e:{},t.on("cursorActivity",c),t.on("focus",c),t.on("blur",r))}),i.defineExtension("matchBrackets",function(){e(this,!0)}),i.defineExtension("findMatchingBracket",function(t,e,n){return!n&&"boolean"!=typeof e||(e=n?(n.strict=e,n):e?{strict:!0}:null),u(this,t,e)}),i.defineExtension("scanForBracket",function(t,e,n,r){return f(this,t,e,n,r)})});
|
||||
!function(t){"object"==typeof exports&&"object"==typeof module?t(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],t):t(CodeMirror)}(function(r){var u=/MSIE \d/.test(navigator.userAgent)&&(null==document.documentMode||document.documentMode<8),k=r.Pos,p={"(":")>",")":"(<","[":"]>","]":"[<","{":"}>","}":"{<","<":">>",">":"<<"};function y(t){return t&&t.bracketRegex||/[(){}[\]]/}function f(t,e,n){var r=t.getLineHandle(e.line),i=e.ch-1,c=n&&n.afterCursor,a=(null==c&&(c=/(^| )cm-fat-cursor($| )/.test(t.getWrapperElement().className)),y(n)),c=!c&&0<=i&&a.test(r.text.charAt(i))&&p[r.text.charAt(i)]||a.test(r.text.charAt(i+1))&&p[r.text.charAt(++i)];if(!c)return null;a=">"==c.charAt(1)?1:-1;if(n&&n.strict&&0<a!=(i==e.ch))return null;r=t.getTokenTypeAt(k(e.line,i+1)),t=o(t,k(e.line,i+(0<a?1:0)),a,r,n);return null==t?null:{from:k(e.line,i),to:t&&t.pos,match:t&&t.ch==c.charAt(0),forward:0<a}}function o(t,e,n,r,i){for(var c=i&&i.maxScanLineLength||1e4,a=i&&i.maxScanLines||1e3,o=[],h=y(i),l=0<n?Math.min(e.line+a,t.lastLine()+1):Math.max(t.firstLine()-1,e.line-a),s=e.line;s!=l;s+=n){var u=t.getLine(s);if(u){var f=0<n?0:u.length-1,m=0<n?u.length:-1;if(!(u.length>c))for(s==e.line&&(f=e.ch-(n<0?1:0));f!=m;f+=n){var g=u.charAt(f);if(h.test(g)&&(void 0===r||(t.getTokenTypeAt(k(s,f+1))||"")==(r||""))){var d=p[g];if(d&&">"==d.charAt(1)==0<n)o.push(g);else{if(!o.length)return{pos:k(s,f),ch:g};o.pop()}}}}}return s-n!=(0<n?t.lastLine():t.firstLine())&&null}function e(t,e,n){for(var r=t.state.matchBrackets.maxHighlightLineLength||1e3,i=n&&n.highlightNonMatching,c=[],a=t.listSelections(),o=0;o<a.length;o++){var h,l=a[o].empty()&&f(t,a[o].head,n);l&&(l.match||!1!==i)&&t.getLine(l.from.line).length<=r&&(h=l.match?"CodeMirror-matchingbracket":"CodeMirror-nonmatchingbracket",c.push(t.markText(l.from,k(l.from.line,l.from.ch+1),{className:h})),l.to&&t.getLine(l.to.line).length<=r&&c.push(t.markText(l.to,k(l.to.line,l.to.ch+1),{className:h})))}if(c.length){u&&t.state.focused&&t.focus();function s(){t.operation(function(){for(var t=0;t<c.length;t++)c[t].clear()})}if(!e)return s;setTimeout(s,800)}}function i(t){t.operation(function(){t.state.matchBrackets.currentlyHighlighted&&(t.state.matchBrackets.currentlyHighlighted(),t.state.matchBrackets.currentlyHighlighted=null),t.state.matchBrackets.currentlyHighlighted=e(t,!1,t.state.matchBrackets)})}function c(t){t.state.matchBrackets&&t.state.matchBrackets.currentlyHighlighted&&(t.state.matchBrackets.currentlyHighlighted(),t.state.matchBrackets.currentlyHighlighted=null)}r.defineOption("matchBrackets",!1,function(t,e,n){n&&n!=r.Init&&(t.off("cursorActivity",i),t.off("focus",i),t.off("blur",c),c(t)),e&&(t.state.matchBrackets="object"==typeof e?e:{},t.on("cursorActivity",i),t.on("focus",i),t.on("blur",c))}),r.defineExtension("matchBrackets",function(){e(this,!0)}),r.defineExtension("findMatchingBracket",function(t,e,n){return f(this,t,e=!n&&"boolean"!=typeof e?e:n?(n.strict=e,n):e?{strict:!0}:null)}),r.defineExtension("scanForBracket",function(t,e,n,r){return o(this,t,e,n,r)})});
|
@@ -1,6 +1 @@
|
||||
.CodeMirror-fullscreen {
|
||||
position: fixed;
|
||||
top: 0; left: 0; right: 0; bottom: 0;
|
||||
height: auto;
|
||||
z-index: 9;
|
||||
}
|
||||
.CodeMirror-fullscreen{position:fixed;top:0;left:0;right:0;bottom:0;height:auto;z-index:9}
|
@@ -1,3 +1 @@
|
||||
// CodeMirror, copyright (c) by Marijn Haverbeke and others
|
||||
// Distributed under an MIT license: https://codemirror.net/LICENSE
|
||||
!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(i){"use strict";i.defineOption("fullScreen",!1,function(e,t,o){var r,l;o==i.Init&&(o=!1),!o!=!t&&(t?(l=(r=e).getWrapperElement(),r.state.fullScreenRestore={scrollTop:window.pageYOffset,scrollLeft:window.pageXOffset,width:l.style.width,height:l.style.height},l.style.width="",l.style.height="auto",l.className+=" CodeMirror-fullscreen",document.documentElement.style.overflow="hidden",r.refresh()):function(e){var t=e.getWrapperElement();t.className=t.className.replace(/\s*CodeMirror-fullscreen\b/,""),document.documentElement.style.overflow="";var o=e.state.fullScreenRestore;t.style.width=o.width,t.style.height=o.height,window.scrollTo(o.scrollLeft,o.scrollTop),e.refresh()}(e))})});
|
||||
!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(r){"use strict";r.defineOption("fullScreen",!1,function(e,t,o){!(o=o==r.Init?!1:o)!=!t&&(t?(t=(o=e).getWrapperElement(),o.state.fullScreenRestore={scrollTop:window.pageYOffset,scrollLeft:window.pageXOffset,width:t.style.width,height:t.style.height},t.style.width="",t.style.height="auto",t.className+=" CodeMirror-fullscreen",document.documentElement.style.overflow="hidden",o.refresh()):((o=(t=e).getWrapperElement()).className=o.className.replace(/\s*CodeMirror-fullscreen\b/,""),document.documentElement.style.overflow="",e=t.state.fullScreenRestore,o.style.width=e.width,o.style.height=e.height,window.scrollTo(e.scrollLeft,e.scrollTop),t.refresh()))})});
|
File diff suppressed because one or more lines are too long
@@ -1,3 +1 @@
|
||||
// CodeMirror, copyright (c) by Marijn Haverbeke and others
|
||||
// Distributed under an MIT license: https://codemirror.net/LICENSE
|
||||
!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";var S={},y=/[^\s\u00a0]/,E=e.Pos,u=e.cmpPos;function f(e){var n=e.search(y);return-1==n?0:n}function M(e,n){var t=e.getMode();return!1!==t.useInnerComments&&t.innerMode?e.getModeAt(n):t}e.commands.toggleComment=function(e){e.toggleComment()},e.defineExtension("toggleComment",function(e){e=e||S;for(var n=this,t=1/0,i=this.listSelections(),l=null,o=i.length-1;0<=o;o--){var r=i[o].from(),m=i[o].to();r.line>=t||(m.line>=t&&(m=E(t,0)),t=r.line,null==l?l=n.uncomment(r,m,e)?"un":(n.lineComment(r,m,e),"line"):"un"==l?n.uncomment(r,m,e):n.lineComment(r,m,e))}}),e.defineExtension("lineComment",function(o,e,r){r=r||S;var n,t,m,a,c,g,s=this,i=M(s,o),l=s.getLine(o.line);null!=l&&(n=o,t=l,!/\bstring\b/.test(s.getTokenTypeAt(E(n.line,0)))||/^[\'\"\`]/.test(t))&&((m=r.lineComment||i.lineComment)?(a=Math.min(0!=e.ch||e.line==o.line?e.line+1:e.line,s.lastLine()+1),c=null==r.padding?" ":r.padding,g=r.commentBlankLines||o.line==e.line,s.operation(function(){if(r.indent){for(var e=null,n=o.line;n<a;++n){var t=(i=s.getLine(n)).slice(0,f(i));(null==e||e.length>t.length)&&(e=t)}for(n=o.line;n<a;++n){var i=s.getLine(n),l=e.length;(g||y.test(i))&&(i.slice(0,l)!=e&&(l=f(i)),s.replaceRange(e+m+c,E(n,0),E(n,l)))}}else for(n=o.line;n<a;++n)(g||y.test(s.getLine(n)))&&s.replaceRange(m+c,E(n,0))})):(r.blockCommentStart||i.blockCommentStart)&&(r.fullLines=!0,s.blockComment(o,e,r)))}),e.defineExtension("blockComment",function(o,r,m){m=m||S;var a,c,g=this,s=M(g,o),f=m.blockCommentStart||s.blockCommentStart,d=m.blockCommentEnd||s.blockCommentEnd;f&&d?/\bcomment\b/.test(g.getTokenTypeAt(E(o.line,0)))||((a=Math.min(r.line,g.lastLine()))!=o.line&&0==r.ch&&y.test(g.getLine(a))&&--a,c=null==m.padding?" ":m.padding,o.line>a||g.operation(function(){if(0!=m.fullLines){var e=y.test(g.getLine(a));g.replaceRange(c+d,E(a)),g.replaceRange(f+c,E(o.line,0));var n=m.blockCommentLead||s.blockCommentLead;if(null!=n)for(var t=o.line+1;t<=a;++t)t==a&&!e||g.replaceRange(n+c,E(t,0))}else{var i=0==u(g.getCursor("to"),r),l=!g.somethingSelected();g.replaceRange(d,r),i&&g.setSelection(l?r:g.getCursor("from"),r),g.replaceRange(f,o)}})):(m.lineComment||s.lineComment)&&0!=m.fullLines&&g.lineComment(o,r,m)}),e.defineExtension("uncomment",function(e,n,t){t=t||S;var l,o=this,i=M(o,e),r=Math.min(0!=n.ch||n.line==e.line?n.line:n.line-1,o.lastLine()),m=Math.min(e.line,r),a=t.lineComment||i.lineComment,c=[],g=null==t.padding?" ":t.padding;e:if(a){for(var s=m;s<=r;++s){var f=o.getLine(s),d=f.indexOf(a);if(-1<d&&!/comment/.test(o.getTokenTypeAt(E(s,d+1)))&&(d=-1),-1==d&&y.test(f))break e;if(-1<d&&y.test(f.slice(0,d)))break e;c.push(f)}if(o.operation(function(){for(var e=m;e<=r;++e){var n=c[e-m],t=n.indexOf(a),i=t+a.length;t<0||(n.slice(i,i+g.length)==g&&(i+=g.length),l=!0,o.replaceRange("",E(e,t),E(e,i)))}}),l)return!0}var u=t.blockCommentStart||i.blockCommentStart,h=t.blockCommentEnd||i.blockCommentEnd;if(!u||!h)return!1;var C=t.blockCommentLead||i.blockCommentLead,p=o.getLine(m),v=p.indexOf(u);if(-1==v)return!1;var b=r==m?p:o.getLine(r),k=b.indexOf(h,r==m?v+u.length:0),L=E(m,v+1),x=E(r,k+1);if(-1==k||!/comment/.test(o.getTokenTypeAt(L))||!/comment/.test(o.getTokenTypeAt(x))||-1<o.getRange(L,x,"\n").indexOf(h))return!1;var R=-1==(T=p.lastIndexOf(u,e.ch))?-1:p.slice(0,e.ch).indexOf(h,T+u.length);if(-1!=T&&-1!=R&&R+h.length!=e.ch)return!1;R=b.indexOf(h,n.ch);var O=b.slice(n.ch).lastIndexOf(u,R-n.ch),T=-1==R||-1==O?-1:n.ch+O;return(-1==R||-1==T||T==n.ch)&&(o.operation(function(){o.replaceRange("",E(r,k-(g&&b.slice(k-g.length,k)==g?g.length:0)),E(r,k+h.length));var e=v+u.length;if(g&&p.slice(e,e+g.length)==g&&(e+=g.length),o.replaceRange("",E(m,v),E(m,e)),C)for(var n=m+1;n<=r;++n){var t,i=o.getLine(n),l=i.indexOf(C);-1==l||y.test(i.slice(0,l))||(t=l+C.length,g&&i.slice(t,t+g.length)==g&&(t+=g.length),o.replaceRange("",E(n,l),E(n,t)))}}),!0)})});
|
||||
!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";var L={},x=/[^\s\u00a0]/,R=e.Pos,u=e.cmpPos;function f(e){e=e.search(x);return-1==e?0:e}function O(e,n){var t=e.getMode();return!1!==t.useInnerComments&&t.innerMode?e.getModeAt(n):t}e.commands.toggleComment=function(e){e.toggleComment()},e.defineExtension("toggleComment",function(e){e=e||L;for(var n=this,t=1/0,i=this.listSelections(),l=null,o=i.length-1;0<=o;o--){var r=i[o].from(),m=i[o].to();r.line>=t||(m.line>=t&&(m=R(t,0)),t=r.line,null==l?l=n.uncomment(r,m,e)?"un":(n.lineComment(r,m,e),"line"):"un"==l?n.uncomment(r,m,e):n.lineComment(r,m,e))}}),e.defineExtension("lineComment",function(o,e,r){r=r||L;var m,a,c,g,s=this,n=O(s,o),t=s.getLine(o.line);null!=t&&(t=t,!/\bstring\b/.test(s.getTokenTypeAt(R(o.line,0)))||/^[\'\"\`]/.test(t))&&((m=r.lineComment||n.lineComment)?(a=Math.min(0!=e.ch||e.line==o.line?e.line+1:e.line,s.lastLine()+1),c=null==r.padding?" ":r.padding,g=r.commentBlankLines||o.line==e.line,s.operation(function(){if(r.indent){for(var e=null,n=o.line;n<a;++n){var t=-1===(i=s.getLine(n)).search(x)?i:i.slice(0,f(i));(null==e||e.length>t.length)&&(e=t)}for(n=o.line;n<a;++n){var i=s.getLine(n),l=e.length;(g||x.test(i))&&(i.slice(0,l)!=e&&(l=f(i)),s.replaceRange(e+m+c,R(n,0),R(n,l)))}}else for(n=o.line;n<a;++n)(g||x.test(s.getLine(n)))&&s.replaceRange(m+c,R(n,0))})):(r.blockCommentStart||n.blockCommentStart)&&(r.fullLines=!0,s.blockComment(o,e,r)))}),e.defineExtension("blockComment",function(o,r,m){m=m||L;var a,c,g=this,s=O(g,o),f=m.blockCommentStart||s.blockCommentStart,d=m.blockCommentEnd||s.blockCommentEnd;f&&d?/\bcomment\b/.test(g.getTokenTypeAt(R(o.line,0)))||((a=Math.min(r.line,g.lastLine()))!=o.line&&0==r.ch&&x.test(g.getLine(a))&&--a,c=null==m.padding?" ":m.padding,o.line>a||g.operation(function(){if(0!=m.fullLines){var e=x.test(g.getLine(a)),n=(g.replaceRange(c+d,R(a)),g.replaceRange(f+c,R(o.line,0)),m.blockCommentLead||s.blockCommentLead);if(null!=n)for(var t=o.line+1;t<=a;++t)t==a&&!e||g.replaceRange(n+c,R(t,0))}else{var i=0==u(g.getCursor("to"),r),l=!g.somethingSelected();g.replaceRange(d,r),i&&g.setSelection(l?r:g.getCursor("from"),r),g.replaceRange(f,o)}})):(m.lineComment||s.lineComment)&&0!=m.fullLines&&g.lineComment(o,r,m)}),e.defineExtension("uncomment",function(e,n,t){t=t||L;var l,o=this,i=O(o,e),r=Math.min(0!=n.ch||n.line==e.line?n.line:n.line-1,o.lastLine()),m=Math.min(e.line,r),a=t.lineComment||i.lineComment,c=[],g=null==t.padding?" ":t.padding;e:if(a){for(var s=m;s<=r;++s){var f=o.getLine(s),d=f.indexOf(a);if(-1==(d=-1<d&&!/comment/.test(o.getTokenTypeAt(R(s,d+1)))?-1:d)&&x.test(f))break e;if(-1<d&&x.test(f.slice(0,d)))break e;c.push(f)}if(o.operation(function(){for(var e=m;e<=r;++e){var n=c[e-m],t=n.indexOf(a),i=t+a.length;t<0||(n.slice(i,i+g.length)==g&&(i+=g.length),l=!0,o.replaceRange("",R(e,t),R(e,i)))}}),l)return!0}var u=t.blockCommentStart||i.blockCommentStart,h=t.blockCommentEnd||i.blockCommentEnd;if(!u||!h)return!1;var C=t.blockCommentLead||i.blockCommentLead,p=o.getLine(m),b=p.indexOf(u);if(-1==b)return!1;var k=r==m?p:o.getLine(r),v=k.indexOf(h,r==m?b+u.length:0),t=R(m,b+1),i=R(r,v+1);if(-1==v||!/comment/.test(o.getTokenTypeAt(t))||!/comment/.test(o.getTokenTypeAt(i))||-1<o.getRange(t,i,"\n").indexOf(h))return!1;i=-1==(t=p.lastIndexOf(u,e.ch))?-1:p.slice(0,e.ch).indexOf(h,t+u.length);if(-1!=t&&-1!=i&&i+h.length!=e.ch)return!1;i=k.indexOf(h,n.ch),e=k.slice(n.ch).lastIndexOf(u,i-n.ch),t=-1==i||-1==e?-1:n.ch+e;return(-1==i||-1==t||t==n.ch)&&(o.operation(function(){o.replaceRange("",R(r,v-(g&&k.slice(v-g.length,v)==g?g.length:0)),R(r,v+h.length));var e=b+u.length;if(g&&p.slice(e,e+g.length)==g&&(e+=g.length),o.replaceRange("",R(m,b),R(m,e)),C)for(var n=m+1;n<=r;++n){var t,i=o.getLine(n),l=i.indexOf(C);-1==l||x.test(i.slice(0,l))||(t=l+C.length,g&&i.slice(t,t+g.length)==g&&(t+=g.length),o.replaceRange("",R(n,l),R(n,t)))}}),!0)})});
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1,3 +1 @@
|
||||
// CodeMirror, copyright (c) by Marijn Haverbeke and others
|
||||
// Distributed under an MIT license: https://codemirror.net/LICENSE
|
||||
!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(p){"use strict";p.multiplexingMode=function(d){var f=Array.prototype.slice.call(arguments,1);function m(e,n,t,i){if("string"==typeof n){var r=e.indexOf(n,t);return i&&-1<r?r+n.length:r}var o=n.exec(t?e.slice(t):e);return o?o.index+t+(i?o[0].length:0):-1}return{startState:function(){return{outer:p.startState(d),innerActive:null,inner:null}},copyState:function(e){return{outer:p.copyState(d,e.outer),innerActive:e.innerActive,inner:e.innerActive&&p.copyState(e.innerActive.mode,e.inner)}},token:function(e,n){if(n.innerActive){var t=n.innerActive,i=e.string;if(!t.close&&e.sol())return n.innerActive=n.inner=null,this.token(e,n);if((l=t.close?m(i,t.close,e.pos,t.parseDelimiters):-1)==e.pos&&!t.parseDelimiters)return e.match(t.close),n.innerActive=n.inner=null,t.delimStyle&&t.delimStyle+" "+t.delimStyle+"-close";-1<l&&(e.string=i.slice(0,l));var r=t.mode.token(e,n.inner);return-1<l&&(e.string=i),l==e.pos&&t.parseDelimiters&&(n.innerActive=n.inner=null),t.innerStyle&&(r=r?r+" "+t.innerStyle:t.innerStyle),r}for(var o=1/0,i=e.string,c=0;c<f.length;++c){var l,s=f[c];if((l=m(i,s.open,e.pos))==e.pos){s.parseDelimiters||e.match(s.open),n.innerActive=s;var a,u=0;return!d.indent||(a=d.indent(n.outer,"",""))!==p.Pass&&(u=a),n.inner=p.startState(s.mode,u),s.delimStyle&&s.delimStyle+" "+s.delimStyle+"-open"}-1!=l&&l<o&&(o=l)}o!=1/0&&(e.string=i.slice(0,o));var v=d.token(e,n.outer);return o!=1/0&&(e.string=i),v},indent:function(e,n,t){var i=e.innerActive?e.innerActive.mode:d;return i.indent?i.indent(e.innerActive?e.inner:e.outer,n,t):p.Pass},blankLine:function(e){var n=e.innerActive?e.innerActive.mode:d;if(n.blankLine&&n.blankLine(e.innerActive?e.inner:e.outer),e.innerActive)"\n"===e.innerActive.close&&(e.innerActive=e.inner=null);else for(var t=0;t<f.length;++t){var i=f[t];"\n"===i.open&&(e.innerActive=i,e.inner=p.startState(i.mode,n.indent?n.indent(e.outer,"",""):0))}},electricChars:d.electricChars,innerMode:function(e){return e.inner?{state:e.inner,mode:e.innerActive.mode}:{state:e.outer,mode:d}}}}});
|
||||
!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(m){"use strict";m.multiplexingMode=function(d){var v=Array.prototype.slice.call(arguments,1);function f(e,n,t,i){if("string"==typeof n)return r=e.indexOf(n,t),i&&-1<r?r+n.length:r;var r=n.exec(t?e.slice(t):e);return r?r.index+t+(i?r[0].length:0):-1}return{startState:function(){return{outer:m.startState(d),innerActive:null,inner:null,startingInner:!1}},copyState:function(e){return{outer:m.copyState(d,e.outer),innerActive:e.innerActive,inner:e.innerActive&&m.copyState(e.innerActive.mode,e.inner),startingInner:e.startingInner}},token:function(e,n){if(n.innerActive){var t=n.innerActive,i=e.string;if(!t.close&&e.sol())return n.innerActive=n.inner=null,this.token(e,n);if((c=t.close&&!n.startingInner?f(i,t.close,e.pos,t.parseDelimiters):-1)==e.pos&&!t.parseDelimiters)return e.match(t.close),n.innerActive=n.inner=null,t.delimStyle&&t.delimStyle+" "+t.delimStyle+"-close";-1<c&&(e.string=i.slice(0,c));var r=t.mode.token(e,n.inner);return-1<c?e.string=i:e.pos>e.start&&(n.startingInner=!1),c==e.pos&&t.parseDelimiters&&(n.innerActive=n.inner=null),r=t.innerStyle?r?r+" "+t.innerStyle:t.innerStyle:r}for(var o=1/0,i=e.string,l=0;l<v.length;++l){var c,s,a,u=v[l];if((c=f(i,u.open,e.pos))==e.pos)return u.parseDelimiters||e.match(u.open),n.startingInner=!!u.parseDelimiters,n.innerActive=u,s=0,d.indent&&(a=d.indent(n.outer,"",""))!==m.Pass&&(s=a),n.inner=m.startState(u.mode,s),u.delimStyle&&u.delimStyle+" "+u.delimStyle+"-open";-1!=c&&c<o&&(o=c)}o!=1/0&&(e.string=i.slice(0,o));t=d.token(e,n.outer);return o!=1/0&&(e.string=i),t},indent:function(e,n,t){var i=e.innerActive?e.innerActive.mode:d;return i.indent?i.indent(e.innerActive?e.inner:e.outer,n,t):m.Pass},blankLine:function(e){var n=e.innerActive?e.innerActive.mode:d;if(n.blankLine&&n.blankLine(e.innerActive?e.inner:e.outer),e.innerActive)"\n"===e.innerActive.close&&(e.innerActive=e.inner=null);else for(var t=0;t<v.length;++t){var i=v[t];"\n"===i.open&&(e.innerActive=i,e.inner=m.startState(i.mode,n.indent?n.indent(e.outer,"",""):0))}},electricChars:d.electricChars,innerMode:function(e){return e.inner?{state:e.inner,mode:e.innerActive.mode}:{state:e.outer,mode:d}}}}});
|
@@ -1,3 +1 @@
|
||||
// CodeMirror, copyright (c) by Marijn Haverbeke and others
|
||||
// Distributed under an MIT license: https://codemirror.net/LICENSE
|
||||
!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror"),require("../htmlmixed/htmlmixed"),require("../../addon/mode/multiplex")):"function"==typeof define&&define.amd?define(["../../lib/codemirror","../htmlmixed/htmlmixed","../../addon/mode/multiplex"],e):e(CodeMirror)}(function(d){"use strict";d.defineMode("htmlembedded",function(e,i){var t=i.closeComment||"--%>";return d.multiplexingMode(d.getMode(e,"htmlmixed"),{open:i.openComment||"<%--",close:t,delimStyle:"comment",mode:{token:function(e){return e.skipTo(t)||e.skipToEnd(),"comment"}}},{open:i.open||i.scriptStartRegex||"<%",close:i.close||i.scriptEndRegex||"%>",mode:d.getMode(e,i.scriptingModeSpec)})},"htmlmixed"),d.defineMIME("application/x-ejs",{name:"htmlembedded",scriptingModeSpec:"javascript"}),d.defineMIME("application/x-aspx",{name:"htmlembedded",scriptingModeSpec:"text/x-csharp"}),d.defineMIME("application/x-jsp",{name:"htmlembedded",scriptingModeSpec:"text/x-java"}),d.defineMIME("application/x-erb",{name:"htmlembedded",scriptingModeSpec:"ruby"})});
|
||||
!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror"),require("../htmlmixed/htmlmixed"),require("../../addon/mode/multiplex")):"function"==typeof define&&define.amd?define(["../../lib/codemirror","../htmlmixed/htmlmixed","../../addon/mode/multiplex"],e):e(CodeMirror)}(function(d){"use strict";d.defineMode("htmlembedded",function(e,i){var t=i.closeComment||"--%>";return d.multiplexingMode(d.getMode(e,"htmlmixed"),{open:i.openComment||"<%--",close:t,delimStyle:"comment",mode:{token:function(e){return e.skipTo(t)||e.skipToEnd(),"comment"}}},{open:i.open||i.scriptStartRegex||"<%",close:i.close||i.scriptEndRegex||"%>",mode:d.getMode(e,i.scriptingModeSpec)})},"htmlmixed"),d.defineMIME("application/x-ejs",{name:"htmlembedded",scriptingModeSpec:"javascript"}),d.defineMIME("application/x-aspx",{name:"htmlembedded",scriptingModeSpec:"text/x-csharp"}),d.defineMIME("application/x-jsp",{name:"htmlembedded",scriptingModeSpec:"text/x-java"}),d.defineMIME("application/x-erb",{name:"htmlembedded",scriptingModeSpec:"ruby"})});
|
@@ -1,3 +1 @@
|
||||
// CodeMirror, copyright (c) by Marijn Haverbeke and others
|
||||
// Distributed under an MIT license: https://codemirror.net/LICENSE
|
||||
!function(t){"object"==typeof exports&&"object"==typeof module?t(require("../../lib/codemirror"),require("../xml/xml"),require("../javascript/javascript"),require("../css/css")):"function"==typeof define&&define.amd?define(["../../lib/codemirror","../xml/xml","../javascript/javascript","../css/css"],t):t(CodeMirror)}(function(p){"use strict";var l={script:[["lang",/(javascript|babel)/i,"javascript"],["type",/^(?:text|application)\/(?:x-)?(?:java|ecma)script$|^module$|^$/i,"javascript"],["type",/./,"text/plain"],[null,null,"javascript"]],style:[["lang",/^css$/i,"css"],["type",/^(text\/)?(x-)?(stylesheet|css)$/i,"css"],["type",/./,"text/plain"],[null,null,"css"]]};var o={};function f(t,e){var a,n=t.match(o[a=e]||(o[a]=new RegExp("\\s+"+a+"\\s*=\\s*('|\")?([^'\"]+)('|\")?\\s*")));return n?/^\s*(.*?)\s*$/.exec(n[2])[1]:""}function h(t,e){return new RegExp((e?"^":"")+"</s*"+t+"s*>","i")}function r(t,e){for(var a in t)for(var n=e[a]||(e[a]=[]),l=t[a],o=l.length-1;0<=o;o--)n.unshift(l[o])}p.defineMode("htmlmixed",function(u,t){var m=p.getMode(u,{name:"xml",htmlMode:!0,multilineTagIndentFactor:t.multilineTagIndentFactor,multilineTagIndentPastTag:t.multilineTagIndentPastTag,allowMissingTagName:t.allowMissingTagName}),d={},e=t&&t.tags,a=t&&t.scriptTypes;if(r(l,d),e&&r(e,d),a)for(var n=a.length-1;0<=n;n--)d.script.unshift(["type",a[n].matches,a[n].mode]);function g(t,e){var a,n,l,o,i,c,r=m.token(t,e.htmlState),s=/\btag\b/.test(r);return s&&!/[<>\s\/]/.test(t.current())&&(a=e.htmlState.tagName&&e.htmlState.tagName.toLowerCase())&&d.hasOwnProperty(a)?e.inTag=a+" ":e.inTag&&s&&/>$/.test(t.current())?(n=/^([\S]+) (.*)/.exec(e.inTag),e.inTag=null,l=">"==t.current()&&function(t,e){for(var a=0;a<t.length;a++){var n=t[a];if(!n[0]||n[1].test(f(e,n[0])))return n[2]}}(d[n[1]],n[2]),o=p.getMode(u,l),i=h(n[1],!0),c=h(n[1],!1),e.token=function(t,e){return t.match(i,!1)?(e.token=g,e.localState=e.localMode=null):(a=t,n=c,l=e.localMode.token(t,e.localState),o=a.current(),-1<(r=o.search(n))?a.backUp(o.length-r):o.match(/<\/?$/)&&(a.backUp(o.length),a.match(n,!1)||a.match(o)),l);var a,n,l,o,r},e.localMode=o,e.localState=p.startState(o,m.indent(e.htmlState,"",""))):e.inTag&&(e.inTag+=t.current(),t.eol()&&(e.inTag+=" ")),r}return{startState:function(){return{token:g,inTag:null,localMode:null,localState:null,htmlState:p.startState(m)}},copyState:function(t){var e;return t.localState&&(e=p.copyState(t.localMode,t.localState)),{token:t.token,inTag:t.inTag,localMode:t.localMode,localState:e,htmlState:p.copyState(m,t.htmlState)}},token:function(t,e){return e.token(t,e)},indent:function(t,e,a){return!t.localMode||/^\s*<\//.test(e)?m.indent(t.htmlState,e,a):t.localMode.indent?t.localMode.indent(t.localState,e,a):p.Pass},innerMode:function(t){return{state:t.localState||t.htmlState,mode:t.localMode||m}}}},"xml","javascript","css"),p.defineMIME("text/html","htmlmixed")});
|
||||
!function(t){"object"==typeof exports&&"object"==typeof module?t(require("../../lib/codemirror"),require("../xml/xml"),require("../javascript/javascript"),require("../css/css")):"function"==typeof define&&define.amd?define(["../../lib/codemirror","../xml/xml","../javascript/javascript","../css/css"],t):t(CodeMirror)}(function(m){"use strict";var l={script:[["lang",/(javascript|babel)/i,"javascript"],["type",/^(?:text|application)\/(?:x-)?(?:java|ecma)script$|^module$|^$/i,"javascript"],["type",/./,"text/plain"],[null,null,"javascript"]],style:[["lang",/^css$/i,"css"],["type",/^(text\/)?(x-)?(stylesheet|css)$/i,"css"],["type",/./,"text/plain"],[null,null,"css"]]};var a={};function d(t,e){e=t.match(a[t=e]||(a[t]=new RegExp("\\s+"+t+"\\s*=\\s*('|\")?([^'\"]+)('|\")?\\s*")));return e?/^\s*(.*?)\s*$/.exec(e[2])[1]:""}function g(t,e){return new RegExp((e?"^":"")+"</\\s*"+t+"\\s*>","i")}function o(t,e){for(var a in t)for(var n=e[a]||(e[a]=[]),l=t[a],o=l.length-1;0<=o;o--)n.unshift(l[o])}m.defineMode("htmlmixed",function(i,t){var c=m.getMode(i,{name:"xml",htmlMode:!0,multilineTagIndentFactor:t.multilineTagIndentFactor,multilineTagIndentPastTag:t.multilineTagIndentPastTag,allowMissingTagName:t.allowMissingTagName}),s={},e=t&&t.tags,a=t&&t.scriptTypes;if(o(l,s),e&&o(e,s),a)for(var n=a.length-1;0<=n;n--)s.script.unshift(["type",a[n].matches,a[n].mode]);function u(t,e){var a,o,r,n=c.token(t,e.htmlState),l=/\btag\b/.test(n);return l&&!/[<>\s\/]/.test(t.current())&&(a=e.htmlState.tagName&&e.htmlState.tagName.toLowerCase())&&s.hasOwnProperty(a)?e.inTag=a+" ":e.inTag&&l&&/>$/.test(t.current())?(a=/^([\S]+) (.*)/.exec(e.inTag),e.inTag=null,l=">"==t.current()&&function(t,e){for(var a=0;a<t.length;a++){var n=t[a];if(!n[0]||n[1].test(d(e,n[0])))return n[2]}}(s[a[1]],a[2]),l=m.getMode(i,l),o=g(a[1],!0),r=g(a[1],!1),e.token=function(t,e){return t.match(o,!1)?(e.token=u,e.localState=e.localMode=null):(a=t,n=r,t=e.localMode.token(t,e.localState),e=a.current(),-1<(l=e.search(n))?a.backUp(e.length-l):e.match(/<\/?$/)&&(a.backUp(e.length),a.match(n,!1)||a.match(e)),t);var a,n,l},e.localMode=l,e.localState=m.startState(l,c.indent(e.htmlState,"",""))):e.inTag&&(e.inTag+=t.current(),t.eol()&&(e.inTag+=" ")),n}return{startState:function(){return{token:u,inTag:null,localMode:null,localState:null,htmlState:m.startState(c)}},copyState:function(t){var e;return t.localState&&(e=m.copyState(t.localMode,t.localState)),{token:t.token,inTag:t.inTag,localMode:t.localMode,localState:e,htmlState:m.copyState(c,t.htmlState)}},token:function(t,e){return e.token(t,e)},indent:function(t,e,a){return!t.localMode||/^\s*<\//.test(e)?c.indent(t.htmlState,e,a):t.localMode.indent?t.localMode.indent(t.localState,e,a):m.Pass},innerMode:function(t){return{state:t.localState||t.htmlState,mode:t.localMode||c}}}},"xml","javascript","css"),m.defineMIME("text/html","htmlmixed")});
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1,14 +1 @@
|
||||
span.cm-underlined {
|
||||
text-decoration: underline;
|
||||
}
|
||||
span.cm-strikethrough {
|
||||
text-decoration: line-through;
|
||||
}
|
||||
span.cm-brace {
|
||||
color: #170;
|
||||
font-weight: bold;
|
||||
}
|
||||
span.cm-table {
|
||||
color: blue;
|
||||
font-weight: bold;
|
||||
}
|
||||
span.cm-underlined{text-decoration:underline}span.cm-strikethrough{text-decoration:line-through}span.cm-brace{color:#170;font-weight:700}span.cm-table{color:#00f;font-weight:700}
|
@@ -1,3 +1 @@
|
||||
// CodeMirror, copyright (c) by Marijn Haverbeke and others
|
||||
// Distributed under an MIT license: http://codemirror.net/LICENSE
|
||||
!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("tiddlywiki",function(){var e={},t={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},r=/[\w_\-]/i,n=/^\-\-\-\-+$/,i=/^\/\*\*\*$/,o=/^\*\*\*\/$/,u=/^<<<$/,a=/^\/\/\{\{\{$/,f=/^\/\/\}\}\}$/,c=/^<!--\{\{\{-->$/,m=/^<!--\}\}\}-->$/,l=/^\{\{\{$/,k=/^\}\}\}$/,d=/.*?\}\}\}/;function h(e,t,r){return t.tokenize=r,r(e,t)}function s(t,k){var d=t.sol(),s=t.peek();if(k.block=!1,d&&/[<\/\*{}\-]/.test(s)){if(t.match(l))return k.block=!0,h(t,k,$);if(t.match(u))return"quote";if(t.match(i)||t.match(o))return"comment";if(t.match(a)||t.match(f)||t.match(c)||t.match(m))return"comment";if(t.match(n))return"hr"}if(t.next(),d&&/[\/\*!#;:>|]/.test(s)){if("!"==s)return t.skipToEnd(),"header";if("*"==s)return t.eatWhile("*"),"comment";if("#"==s)return t.eatWhile("#"),"comment";if(";"==s)return t.eatWhile(";"),"comment";if(":"==s)return t.eatWhile(":"),"comment";if(">"==s)return t.eatWhile(">"),"quote";if("|"==s)return"header"}if("{"==s&&t.match(/\{\{/))return h(t,k,$);if(/[hf]/i.test(s)&&/[ti]/i.test(t.peek())&&t.match(/\b(ttps?|tp|ile):\/\/[\-A-Z0-9+&@#\/%?=~_|$!:,.;]*[A-Z0-9+&@#\/%=~_|$]/i))return"link";if('"'==s)return"string";if("~"==s)return"brace";if(/[\[\]]/.test(s)&&t.match(s))return"brace";if("@"==s)return t.eatWhile(r),"link";if(/\d/.test(s))return t.eatWhile(/\d/),"number";if("/"==s){if(t.eat("%"))return h(t,k,b);if(t.eat("/"))return h(t,k,v)}if("_"==s&&t.eat("_"))return h(t,k,w);if("-"==s&&t.eat("-")){if(" "!=t.peek())return h(t,k,x);if(" "==t.peek())return"brace"}return"'"==s&&t.eat("'")?h(t,k,p):"<"==s&&t.eat("<")?h(t,k,z):(t.eatWhile(/[\w\$_]/),e.propertyIsEnumerable(t.current())?"keyword":null)}function b(e,t){for(var r,n=!1;r=e.next();){if("/"==r&&n){t.tokenize=s;break}n="%"==r}return"comment"}function p(e,t){for(var r,n=!1;r=e.next();){if("'"==r&&n){t.tokenize=s;break}n="'"==r}return"strong"}function $(e,t){var r=t.block;return r&&e.current()?"comment":!r&&e.match(d)?(t.tokenize=s,"comment"):r&&e.sol()&&e.match(k)?(t.tokenize=s,"comment"):(e.next(),"comment")}function v(e,t){for(var r,n=!1;r=e.next();){if("/"==r&&n){t.tokenize=s;break}n="/"==r}return"em"}function w(e,t){for(var r,n=!1;r=e.next();){if("_"==r&&n){t.tokenize=s;break}n="_"==r}return"underlined"}function x(e,t){for(var r,n=!1;r=e.next();){if("-"==r&&n){t.tokenize=s;break}n="-"==r}return"strikethrough"}function z(e,r){if("<<"==e.current())return"macro";var n=e.next();return n?">"==n&&">"==e.peek()?(e.next(),r.tokenize=s,"macro"):(e.eatWhile(/[\w\$_]/),t.propertyIsEnumerable(e.current())?"keyword":null):(r.tokenize=s,null)}return{startState:function(){return{tokenize:s}},token:function(e,t){return e.eatSpace()?null:t.tokenize(e,t)}}}),e.defineMIME("text/x-tiddlywiki","tiddlywiki")});
|
||||
!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("tiddlywiki",function(){var i={},n={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},o=/[\w_\-]/i,u=/^\-\-\-\-+$/,a=/^\/\*\*\*$/,f=/^\*\*\*\/$/,c=/^<<<$/,l=/^\/\/\{\{\{$/,m=/^\/\/\}\}\}$/,k=/^<!--\{\{\{-->$/,d=/^<!--\}\}\}-->$/,h=/^\{\{\{$/,s=/^\}\}\}$/,b=/.*?\}\}\}/;function p(e,t,r){return(t.tokenize=r)(e,t)}function $(e,t){var r=e.sol(),n=e.peek();if(t.block=!1,r&&/[<\/\*{}\-]/.test(n)){if(e.match(h))return t.block=!0,p(e,t,x);if(e.match(c))return"quote";if(e.match(a)||e.match(f))return"comment";if(e.match(l)||e.match(m)||e.match(k)||e.match(d))return"comment";if(e.match(u))return"hr"}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 p(e,t,x);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)return"brace";if(/[\[\]]/.test(n)&&e.match(n))return"brace";if("@"==n)return e.eatWhile(o),"link";if(/\d/.test(n))return e.eatWhile(/\d/),"number";if("/"==n){if(e.eat("%"))return p(e,t,v);if(e.eat("/"))return p(e,t,y)}if("_"==n&&e.eat("_"))return p(e,t,z);if("-"==n&&e.eat("-")){if(" "!=e.peek())return p(e,t,g);if(" "==e.peek())return"brace"}return"'"==n&&e.eat("'")?p(e,t,w):"<"==n&&e.eat("<")?p(e,t,W):(e.eatWhile(/[\w\$_]/),i.propertyIsEnumerable(e.current())?"keyword":null)}function v(e,t){for(var r,n=!1;r=e.next();){if("/"==r&&n){t.tokenize=$;break}n="%"==r}return"comment"}function w(e,t){for(var r,n=!1;r=e.next();){if("'"==r&&n){t.tokenize=$;break}n="'"==r}return"strong"}function x(e,t){var r=t.block;return r&&e.current()||(!r&&e.match(b)||r&&e.sol()&&e.match(s)?t.tokenize=$:e.next()),"comment"}function y(e,t){for(var r,n=!1;r=e.next();){if("/"==r&&n){t.tokenize=$;break}n="/"==r}return"em"}function z(e,t){for(var r,n=!1;r=e.next();){if("_"==r&&n){t.tokenize=$;break}n="_"==r}return"underlined"}function g(e,t){for(var r,n=!1;r=e.next();){if("-"==r&&n){t.tokenize=$;break}n="-"==r}return"strikethrough"}function W(e,t){if("<<"==e.current())return"macro";var r=e.next();return r?">"==r&&">"==e.peek()?(e.next(),t.tokenize=$,"macro"):(e.eatWhile(/[\w\$_]/),n.propertyIsEnumerable(e.current())?"keyword":null):(t.tokenize=$,null)}return{startState:function(){return{tokenize:$}},token:function(e,t){return e.eatSpace()?null:t.tokenize(e,t)}}}),e.defineMIME("text/x-tiddlywiki","tiddlywiki")});
|
File diff suppressed because one or more lines are too long
@@ -1,3 +1 @@
|
||||
// CodeMirror, copyright (c) by Marijn Haverbeke and others
|
||||
// Distributed under an MIT license: https://codemirror.net/LICENSE
|
||||
!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror"),require("../dialog/dialog")):"function"==typeof define&&define.amd?define(["../../lib/codemirror","../dialog/dialog"],e):e(CodeMirror)}(function(e){"use strict";function u(e,o){var r=Number(o);return/^[-+]/.test(o)?e.getCursor().line+r:r-1}e.defineOption("search",{bottom:!1}),e.commands.jumpToLine=function(t){var e,o,r,s,i,n,l=t.getCursor();o=(n=e=t).phrase("Jump to line:")+' <input type="text" style="width: 10em" class="CodeMirror-search-field"/> <span style="color: #888" class="CodeMirror-search-hint">'+n.phrase("(Use line:column or scroll% syntax)")+"</span>",r=t.phrase("Jump to line:"),s=l.line+1+":"+l.ch,i=function(e){var o,r;e&&((o=/^\s*([\+\-]?\d+)\s*\:\s*(\d+)\s*$/.exec(e))?t.setCursor(u(t,o[1]),Number(o[2])):(o=/^\s*([\+\-]?\d+(\.\d+)?)\%\s*/.exec(e))?(r=Math.round(t.lineCount()*Number(o[1])/100),/^[-+]/.test(o[1])&&(r=l.line+r+1),t.setCursor(r-1,l.ch)):(o=/^\s*\:?\s*([\+\-]?\d+)\s*/.exec(e))&&t.setCursor(u(t,o[1]),l.ch))},e.openDialog?e.openDialog(o,i,{value:s,selectValueOnOpen:!0,bottom:e.options.search.bottom}):i(prompt(r,s))},e.keyMap.default["Alt-G"]="jumpToLine"});
|
||||
!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror"),require("../dialog/dialog")):"function"==typeof define&&define.amd?define(["../../lib/codemirror","../dialog/dialog"],e):e(CodeMirror)}(function(e){"use strict";function l(e,o){var r=Number(o);return/^[-+]/.test(o)?e.getCursor().line+r:r-1}e.defineOption("search",{bottom:!1}),e.commands.jumpToLine=function(t){var e,o,r,s,i,n=t.getCursor();i=(i=e=t).phrase("Jump to line:")+' <input type="text" style="width: 10em" class="CodeMirror-search-field"/> <span style="color: #888" class="CodeMirror-search-hint">'+i.phrase("(Use line:column or scroll% syntax)")+"</span>",o=t.phrase("Jump to line:"),r=n.line+1+":"+n.ch,s=function(e){var o,r;e&&((o=/^\s*([\+\-]?\d+)\s*\:\s*(\d+)\s*$/.exec(e))?t.setCursor(l(t,o[1]),Number(o[2])):(o=/^\s*([\+\-]?\d+(\.\d+)?)\%\s*/.exec(e))?(r=Math.round(t.lineCount()*Number(o[1])/100),/^[-+]/.test(o[1])&&(r=n.line+r+1),t.setCursor(r-1,n.ch)):(o=/^\s*\:?\s*([\+\-]?\d+)\s*/.exec(e))&&t.setCursor(l(t,o[1]),n.ch))},e.openDialog?e.openDialog(i,s,{value:r,selectValueOnOpen:!0,bottom:e.options.search.bottom}):s(prompt(o,r))},e.keyMap.default["Alt-G"]="jumpToLine"});
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1,27 +1 @@
|
||||
// CodeMirror, copyright (c) by Marijn Haverbeke and others
|
||||
// Distributed under an MIT license: https://codemirror.net/5/LICENSE
|
||||
|
||||
(function(mod) {
|
||||
if (typeof exports == "object" && typeof module == "object") // CommonJS
|
||||
mod(require("../../lib/codemirror"));
|
||||
else if (typeof define == "function" && define.amd) // AMD
|
||||
define(["../../lib/codemirror"], mod);
|
||||
else // Plain browser env
|
||||
mod(CodeMirror);
|
||||
})(function(CodeMirror) {
|
||||
CodeMirror.defineOption("showTrailingSpace", false, function(cm, val, prev) {
|
||||
if (prev == CodeMirror.Init) prev = false;
|
||||
if (prev && !val)
|
||||
cm.removeOverlay("trailingspace");
|
||||
else if (!prev && val)
|
||||
cm.addOverlay({
|
||||
token: function(stream) {
|
||||
for (var l = stream.string.length, i = l; i && /\s/.test(stream.string.charAt(i - 1)); --i) {}
|
||||
if (i > stream.pos) { stream.pos = i; return null; }
|
||||
stream.pos = l;
|
||||
return "trailingspace";
|
||||
},
|
||||
name: "trailingspace"
|
||||
});
|
||||
});
|
||||
});
|
||||
!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(o){o.defineOption("showTrailingSpace",!1,function(e,i,n){(n=n==o.Init?!1:n)&&!i?e.removeOverlay("trailingspace"):!n&&i&&e.addOverlay({token:function(e){for(var i=e.string.length,n=i;n&&/\s/.test(e.string.charAt(n-1));--n);return n>e.pos?(e.pos=n,null):(e.pos=i,"trailingspace")},name:"trailingspace"})})});
|
@@ -1,32 +1 @@
|
||||
.CodeMirror-dialog {
|
||||
position: absolute;
|
||||
left: 0; right: 0;
|
||||
background: inherit;
|
||||
z-index: 15;
|
||||
padding: .1em .8em;
|
||||
overflow: hidden;
|
||||
color: inherit;
|
||||
}
|
||||
|
||||
.CodeMirror-dialog-top {
|
||||
border-bottom: 1px solid #eee;
|
||||
top: 0;
|
||||
}
|
||||
|
||||
.CodeMirror-dialog-bottom {
|
||||
border-top: 1px solid #eee;
|
||||
bottom: 0;
|
||||
}
|
||||
|
||||
.CodeMirror-dialog input {
|
||||
border: none;
|
||||
outline: none;
|
||||
background: transparent;
|
||||
width: 20em;
|
||||
color: inherit;
|
||||
font-family: monospace;
|
||||
}
|
||||
|
||||
.CodeMirror-dialog button {
|
||||
font-size: 70%;
|
||||
}
|
||||
.CodeMirror-dialog{position:absolute;left:0;right:0;background:inherit;z-index:15;padding:.1em .8em;overflow:hidden;color:inherit}.CodeMirror-dialog-top{border-bottom:1px solid #eee;top:0}.CodeMirror-dialog-bottom{border-top:1px solid #eee;bottom:0}.CodeMirror-dialog input{border:none;outline:0;background:0 0;width:20em;color:inherit;font-family:monospace}.CodeMirror-dialog button{font-size:70%}
|
@@ -1 +1 @@
|
||||
!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(s){function f(e,o,n){var t=e.getWrapperElement(),i=t.appendChild(document.createElement("div"));return i.className=n?"CodeMirror-dialog CodeMirror-dialog-bottom":"CodeMirror-dialog CodeMirror-dialog-top","string"==typeof o?i.innerHTML=o:i.appendChild(o),s.addClass(t,"dialog-opened"),i}function p(e,o){e.state.currentNotificationClose&&e.state.currentNotificationClose(),e.state.currentNotificationClose=o}s.defineExtension("openDialog",function(e,o,n){n=n||{},p(this,null);var t=f(this,e,n.bottom),i=!1,r=this;function u(e){if("string"==typeof e)a.value=e;else{if(i)return;i=!0,s.rmClass(t.parentNode,"dialog-opened"),t.parentNode.removeChild(t),r.focus(),n.onClose&&n.onClose(t)}}var l,a=t.getElementsByTagName("input")[0];return a?(a.focus(),n.value&&(a.value=n.value,!1!==n.selectValueOnOpen&&a.select()),n.onInput&&s.on(a,"input",function(e){n.onInput(e,a.value,u)}),n.onKeyUp&&s.on(a,"keyup",function(e){n.onKeyUp(e,a.value,u)}),s.on(a,"keydown",function(e){n&&n.onKeyDown&&n.onKeyDown(e,a.value,u)||((27==e.keyCode||!1!==n.closeOnEnter&&13==e.keyCode)&&(a.blur(),s.e_stop(e),u()),13==e.keyCode&&o(a.value,e))}),!1!==n.closeOnBlur&&s.on(t,"focusout",function(e){null!==e.relatedTarget&&u()})):(l=t.getElementsByTagName("button")[0])&&(s.on(l,"click",function(){u(),r.focus()}),!1!==n.closeOnBlur&&s.on(l,"blur",u),l.focus()),u}),s.defineExtension("openConfirm",function(e,o,n){p(this,null);var t=f(this,e,n&&n.bottom),i=t.getElementsByTagName("button"),r=!1,u=this,l=1;function a(){r||(r=!0,s.rmClass(t.parentNode,"dialog-opened"),t.parentNode.removeChild(t),u.focus())}i[0].focus();for(var c=0;c<i.length;++c){var d=i[c];!function(o){s.on(d,"click",function(e){s.e_preventDefault(e),a(),o&&o(u)})}(o[c]),s.on(d,"blur",function(){--l,setTimeout(function(){l<=0&&a()},200)}),s.on(d,"focus",function(){++l})}}),s.defineExtension("openNotification",function(e,o){p(this,u);var n,t=f(this,e,o&&o.bottom),i=!1,r=o&&void 0!==o.duration?o.duration:5e3;function u(){i||(i=!0,clearTimeout(n),s.rmClass(t.parentNode,"dialog-opened"),t.parentNode.removeChild(t))}return s.on(t,"click",function(e){s.e_preventDefault(e),u()}),r&&(n=setTimeout(u,r)),u})});
|
||||
!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(s){function f(e,o,n){var e=e.getWrapperElement(),t=e.appendChild(document.createElement("div"));return t.className=n?"CodeMirror-dialog CodeMirror-dialog-bottom":"CodeMirror-dialog CodeMirror-dialog-top","string"==typeof o?t.innerHTML=o:t.appendChild(o),s.addClass(e,"dialog-opened"),t}function p(e,o){e.state.currentNotificationClose&&e.state.currentNotificationClose(),e.state.currentNotificationClose=o}s.defineExtension("openDialog",function(e,o,n){n=n||{},p(this,null);var t=f(this,e,n.bottom),i=!1,r=this;function u(e){"string"==typeof e?l.value=e:i||(i=!0,s.rmClass(t.parentNode,"dialog-opened"),t.parentNode.removeChild(t),r.focus(),n.onClose&&n.onClose(t))}var l=t.getElementsByTagName("input")[0];return l?(l.focus(),n.value&&(l.value=n.value,!1!==n.selectValueOnOpen&&l.select()),n.onInput&&s.on(l,"input",function(e){n.onInput(e,l.value,u)}),n.onKeyUp&&s.on(l,"keyup",function(e){n.onKeyUp(e,l.value,u)}),s.on(l,"keydown",function(e){n&&n.onKeyDown&&n.onKeyDown(e,l.value,u)||((27==e.keyCode||!1!==n.closeOnEnter&&13==e.keyCode)&&(l.blur(),s.e_stop(e),u()),13==e.keyCode&&o(l.value,e))}),!1!==n.closeOnBlur&&s.on(t,"focusout",function(e){null!==e.relatedTarget&&u()})):(e=t.getElementsByTagName("button")[0])&&(s.on(e,"click",function(){u(),r.focus()}),!1!==n.closeOnBlur&&s.on(e,"blur",u),e.focus()),u}),s.defineExtension("openConfirm",function(e,o,n){p(this,null);var t=f(this,e,n&&n.bottom),i=t.getElementsByTagName("button"),r=!1,u=this,l=1;function a(){r||(r=!0,s.rmClass(t.parentNode,"dialog-opened"),t.parentNode.removeChild(t),u.focus())}i[0].focus();for(var c=0;c<i.length;++c){var d=i[c];!function(o){s.on(d,"click",function(e){s.e_preventDefault(e),a(),o&&o(u)})}(o[c]),s.on(d,"blur",function(){--l,setTimeout(function(){l<=0&&a()},200)}),s.on(d,"focus",function(){++l})}}),s.defineExtension("openNotification",function(e,o){p(this,r);var n,t=f(this,e,o&&o.bottom),i=!1,e=o&&void 0!==o.duration?o.duration:5e3;function r(){i||(i=!0,clearTimeout(n),s.rmClass(t.parentNode,"dialog-opened"),t.parentNode.removeChild(t))}return s.on(t,"click",function(e){s.e_preventDefault(e),r()}),e&&(n=setTimeout(r,e)),r})});
|
@@ -1 +1 @@
|
||||
!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(r){"use strict";var s="CodeMirror-activeline",c="CodeMirror-activeline-background",l="CodeMirror-activeline-gutter";function f(e){for(var t=0;t<e.state.activeLines.length;t++)e.removeLineClass(e.state.activeLines[t],"wrap",s),e.removeLineClass(e.state.activeLines[t],"background",c),e.removeLineClass(e.state.activeLines[t],"gutter",l)}function o(t,e){for(var n=[],i=0;i<e.length;i++){var r,o=e[i],a=t.getOption("styleActiveLine");("object"==typeof a&&a.nonEmpty?o.anchor.line==o.head.line:o.empty())&&(r=t.getLineHandleVisualStart(o.head.line),n[n.length-1]!=r&&n.push(r))}!function(e,t){if(e.length==t.length){for(var n=0;n<e.length;n++)if(e[n]!=t[n])return;return 1}}(t.state.activeLines,n)&&t.operation(function(){f(t);for(var e=0;e<n.length;e++)t.addLineClass(n[e],"wrap",s),t.addLineClass(n[e],"background",c),t.addLineClass(n[e],"gutter",l);t.state.activeLines=n})}function a(e,t){o(e,t.ranges)}r.defineOption("styleActiveLine",!1,function(e,t,n){var i=n!=r.Init&&n;t!=i&&(i&&(e.off("beforeSelectionChange",a),f(e),delete e.state.activeLines),t&&(e.state.activeLines=[],o(e,e.listSelections()),e.on("beforeSelectionChange",a)))})});
|
||||
!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(i){"use strict";var a="CodeMirror-activeline",s="CodeMirror-activeline-background",c="CodeMirror-activeline-gutter";function l(e){for(var t=0;t<e.state.activeLines.length;t++)e.removeLineClass(e.state.activeLines[t],"wrap",a),e.removeLineClass(e.state.activeLines[t],"background",s),e.removeLineClass(e.state.activeLines[t],"gutter",c)}function o(t,e){for(var n=[],i=0;i<e.length;i++){var o=e[i],r=t.getOption("styleActiveLine");("object"==typeof r&&r.nonEmpty?o.anchor.line==o.head.line:o.empty())&&(r=t.getLineHandleVisualStart(o.head.line),n[n.length-1]!=r&&n.push(r))}!function(e,t){if(e.length==t.length){for(var n=0;n<e.length;n++)if(e[n]!=t[n])return;return 1}}(t.state.activeLines,n)&&t.operation(function(){l(t);for(var e=0;e<n.length;e++)t.addLineClass(n[e],"wrap",a),t.addLineClass(n[e],"background",s),t.addLineClass(n[e],"gutter",c);t.state.activeLines=n})}function r(e,t){o(e,t.ranges)}i.defineOption("styleActiveLine",!1,function(e,t,n){n=n!=i.Init&&n;t!=n&&(n&&(e.off("beforeSelectionChange",r),l(e),delete e.state.activeLines),t&&(e.state.activeLines=[],o(e,e.listSelections()),e.on("beforeSelectionChange",r)))})});
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -4,4 +4,4 @@ This plugin provides an enhanced text editor component based on [[CodeMirror|htt
|
||||
|
||||
[[Source code|https://github.com/TiddlyWiki/TiddlyWiki5/blob/master/plugins/tiddlywiki/codemirror]]
|
||||
|
||||
Based on ~CodeMirror version 5.58.3
|
||||
Based on ~CodeMirror version 5.65.19
|
||||
|
Reference in New Issue
Block a user