anchor.diff:  'use strict';
   $(() => {
   
  +  // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  +  // Notes
  +  // 1. If the repl docker container's id was based *only* on the kata-id,
  +  // then creating a new repl could  fail if there was a very recent
  +  // [resume], which caused a repl DELETE request, but the docker daemon
  +  // had not yet actually deleted the repl container.
  +  // So the repl and socket Urls for a repl session have a random suffix.
  +  // 2. Trying to put Terminal inside a jQuery dialog is, empirically,
  +  // very tricksy (because of CSS z-Index issues I think).
  +
     const kataPage = $('#kata-page');
     const replPage = $('#repl-page');
     const resumeButton = $('.resume-button', replPage);
     const kataId = "<%= @kata.id %>";
  -  const replUrl = () => `${location.hostname}/repler/${kataId}-${sessionId}`;
  -  let sessionId = null;
  +  const replUrl = (sessionId) => `${location.hostname}/repler/${kataId}-${sessionId}`;
  +  const sessionId = () => Math.random().toString(36).replace(/[^a-z]+/g, '').substr(0,6);
   
     cd.openReplPage = () => {
       kataPage.fadeOut('slow', () => {
         replPage.fadeIn('slow', () => {
  -        replInit();
  +        const element = document.getElementById('repl-terminal');
  +        const terminal = createTerminalIn(element);
  +        cd.saveCodeFromSyntaxHighlightEditors();
  +        replInit(terminal,sessionId());
         });
       });
     };
  
positive.code:   };
  
    Repl.prototype.delete = function() {
      // Request that the REPL be terminated.
      // Returns the promise for the DELETE request.
      this.terminal.greenWriteln('Deleting REPL');
      return fetch(this.url, { method: 'DELETE' });
    };
  
negative.code:   };
  
    //- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  
    function Repl(terminal,sid) {
      this.url = `http://${replUrl(sid)}`;
      this.terminal = terminal;
    };
  
    Repl.prototype.create = function() {
      this.terminal.greenWriteln('Creating REPL');
      const requestParams = {
        method: 'POST',
  