anchor.diff:      return `${greenCode}${s}${resetCode}`;
     };
   
  -  const destroyRepl = (term) => {
  +  const destroyRepl = (_terminal) => {
       // Request that the REPL be terminated.
       // Returns the promise for the DELETE request.
       console.log('destroying repl');
  -    //term.writeln(inGreen('REPL disconnected'));
  -    return fetch(replURL, { method: 'DELETE' });
  +    //terminal.writeln(inGreen('REPL disconnected'));
  +    return fetch(replUrl, { method: 'DELETE' });
     };
   
  -  const createRepl = (term) => {
  +  const createRepl = (terminal) => {
       // Request that a REPL be created.
       // Returns the promise for the POST request.
  -    term.writeln(inGreen('Connecting to REPL'));
  +    terminal.writeln(inGreen('Connecting to REPL'));
       console.log('creating repl');
       cd.saveCodeFromSyntaxHighlightEditors();
       const form = replButton.closest('form');
  
positive.code:     Terminal.applyAddon(search);
      Terminal.applyAddon(winptyCompat);
      $(`#${cssId}`).show();
      term.open(terminalContainer);
      term.winptyCompatInit();
      term.fit();
      term.focus();
      return term;
    };
  
    //- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    const urlId = "<%= @kata.id %>";
    const replURL = 'http://' + location.hostname + '/repler/' + urlId;
    const socketURL = 'ws://' + location.hostname + '/repler_ws/' + urlId;
  
    const inGreen = (s) => {
      const greenCode = '\u001b[32m';
  
negative.code:       terminal.detach(that.socket);
        const NGINX_TIMEOUT_CODE = 1006;
        if (event.code === NGINX_TIMEOUT_CODE) {
          that.start(url, terminal);
        }
      };
  
  