themes/default/public/scripts/ghostdown.js
function loadMode(cm) {
    cm.doc.mode = CodeMirror.getMode(cm.options, cm.doc.modeOption);
    cm.doc.iter(function(line) {
      if (line.stateAfter) line.stateAfter = null;
      if (line.styles) line.styles = null;
    });
    cm.doc.frontier = cm.doc.first;
    startWorker(cm, 100);
    cm.state.modeGen++;
    if (cm.curOp) regChange(cm);
  }
function loadMode(cm) {
    cm.doc.mode = CodeMirror.getMode(cm.options, cm.doc.modeOption);
    cm.doc.iter(function(line) {
      if (line.stateAfter) line.stateAfter = null;
      if (line.styles) line.styles = null;
    });
    cm.doc.frontier = cm.doc.first;
    startWorker(cm, 100);
    cm.state.modeGen++;
    if (cm.curOp) regChange(cm);
  }
function loadMode ( cm ) { cm . doc . mode = CodeMirror . getMode ( cm . options , cm . doc . modeOption ) ; cm . doc . iter ( function ( line ) { if ( line . stateAfter ) line . stateAfter = null ; if ( line . styles ) line . styles = null ; } ) ; cm . doc . frontier = cm . doc . first ; startWorker ( cm , 100 ) ; cm . state . modeGen ++ ; if ( cm . curOp ) regChange ( cm ) ; }
STATE UPDATES Used to get the editor into a consistent state again when options change.
STATE UPDATES Used to get the editor into a consistent state again when options change .