{ "tiddlers": { "$:/config/codemirror/autoCloseBrackets": { "title": "$:/config/codemirror/autoCloseBrackets", "type": "bool", "text": "true" }, "$:/config/codemirror/matchBrackets": { "title": "$:/config/codemirror/matchBrackets", "type": "bool", "text": "true\n" }, "$:/plugins/tiddlywiki/codemirror/addon/edit/closebrackets.js": { "text": "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: https://codemirror.net/LICENSE\n!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\",\")\":\"(<\",\"[\":\"]>\",\"]\":\"[<\",\"{\":\"}>\",\"}\":\"{<\",\"<\":\">>\",\">\":\"<<\"};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&&0c))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