CoreFiles by mySites.guru
match-highlighter.min.js1 lines, 2,666 bytes, from Joomla_4.0.0-alpha2-Alpha-Full_Package.zip
Raw History Compare with 3.10.0-alpha9
md5
385aa1c8f15fec176708a341a8e93919
sha1
5f778cf76715695272cb45684a0f260185403dde
sha256
093292d1191c03d04ac3210aec95c971cd2e986fe8a7b31bd2d5736ea1c6d754
!function(t){"object"==typeof exports&&"object"==typeof module?t(require("../../lib/codemirror"),require("./matchesonscrollbar")):"function"==typeof define&&define.amd?define(["../../lib/codemirror","./matchesonscrollbar"],t):t(CodeMirror)}(function(t){"use strict";function e(t){var e=t.state.matchHighlighter;(e.active||t.hasFocus())&&i(t,e)}function o(t){var e=t.state.matchHighlighter;e.active||(e.active=!0,i(t,e))}function i(t,e){clearTimeout(e.timeout),e.timeout=setTimeout(function(){a(t)},e.options.delay)}function n(t,e,o,i){var n=t.state.matchHighlighter;if(t.addOverlay(n.overlay=function(t,e,o){return{token:function(i){if(i.match(t)&&(!e||function(t,e){return!(t.start&&e.test(t.string.charAt(t.start-1))||t.pos!=t.string.length&&e.test(t.string.charAt(t.pos)))}(i,e)))return o;i.next(),i.skipTo(t.charAt(0))||i.skipToEnd()}}}(e,o,i)),n.options.annotateScrollbar&&t.showMatchesOnScrollbar){var r=o?new RegExp("\\b"+e+"\\b"):e;n.matchesonscroll=t.showMatchesOnScrollbar(r,!1,{className:"CodeMirror-selection-highlight-scrollbar"})}}function r(t){var e=t.state.matchHighlighter;e.overlay&&(t.removeOverlay(e.overlay),e.overlay=null,e.matchesonscroll&&(e.matchesonscroll.clear(),e.matchesonscroll=null))}function a(t){t.operation(function(){var e=t.state.matchHighlighter;if(r(t),t.somethingSelected()||!e.options.showToken){var o=t.getCursor("from"),i=t.getCursor("to");if(o.line==i.line&&(!e.options.wordsOnly||function(t,e,o){if(null!==t.getRange(e,o).match(/^\w+$/)){if(e.ch>0){i={line:e.line,ch:e.ch-1};if(null===(n=t.getRange(i,e)).match(/\W/))return!1}if(o.ch<t.getLine(e.line).length){var i={line:o.line,ch:o.ch+1},n=t.getRange(o,i);if(null===n.match(/\W/))return!1}return!0}return!1}(t,o,i))){var a=t.getRange(o,i);e.options.trim&&(a=a.replace(/^\s+|\s+$/g,"")),a.length>=e.options.minChars&&n(t,a,!1,e.options.style)}}else{for(var s=!0===e.options.showToken?/[\w$]/:e.options.showToken,c=t.getCursor(),l=t.getLine(c.line),h=c.ch,u=h;h&&s.test(l.charAt(h-1));)--h;for(;u<l.length&&s.test(l.charAt(u));)++u;h<u&&n(t,l.slice(h,u),s,e.options.style)}})}var s={style:"matchhighlight",minChars:2,delay:100,wordsOnly:!1,annotateScrollbar:!1,showToken:!1,trim:!0};t.defineOption("highlightSelectionMatches",!1,function(i,n,c){if(c&&c!=t.Init&&(r(i),clearTimeout(i.state.matchHighlighter.timeout),i.state.matchHighlighter=null,i.off("cursorActivity",e),i.off("focus",o)),n){var l=i.state.matchHighlighter=new function(t){this.options={};for(var e in s)this.options[e]=(t&&t.hasOwnProperty(e)?t:s)[e];this.overlay=this.timeout=null,this.matchesonscroll=null,this.active=!1}(n);i.hasFocus()?(l.active=!0,a(i)):i.on("focus",o),i.on("cursorActivity",e)}})});

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