Wikipedia/assets/codemirror/resources/addon/search/search.js
//same as replace(cm, all) but bypasses CodeMirror dialogs. Split this up into all & single variants for simplicity
same as replace(cm, all) but bypasses CodeMirror dialogs. Split this up into all & single variants for simplicity
same as replace ( cm all ) but bypasses CodeMirror dialogs . Split this up into all & single variants for simplicity
function replaceAllWithoutDialogs(cm) {
      var replaceText = cm.state.replaceText;
      if (cm.getOption("readOnly")) return;
      if (!replaceText) return;
      var query = cm.state.query;
      query = parseQuery(query);
      replaceText = parseString(replaceText);
      cm.isReplacing = true;
      replaceAll(cm, query, replaceText);
      cm.isReplacing = false;
      let state = getSearchState(cm);
      focusOnMatch(state, null, false);
    }
function replaceAllWithoutDialogs ( cm ) { var replaceText = cm . state . replaceText ; if ( cm . getOption ( "readOnly" ) ) return ; if ( ! replaceText ) return ; var query = cm . state . query ; query = parseQuery ( query ) ; replaceText = parseString ( replaceText ) ; cm . isReplacing = true ; replaceAll ( cm , query , replaceText ) ; cm . isReplacing = false ; let state = getSearchState ( cm ) ; focusOnMatch ( state , null , false ) ; }
same as replace(cm, all) but bypasses CodeMirror dialogs.
same as replace ( cm all ) but bypasses CodeMirror dialogs .
//resets count to 0/0