Support for code cells with prompts and output

This page illustrates the handling of code cells containing (continuation) prompts and outputs. Upon activation, the prompts and output are stripped. Furthermore, the code cell is split wherever there is an output or blank line.

Note: the implementation currently assumes that all commands in all code cells are prefixed by prompts.

This is the original cell:

    sage: 1 + 1
    2
    sage: x = 3
    sage: y = 4

    sage: z = 5
    sage: x + y + \
    ....: z
    7
  

This is the resulting live cell:

    sage: 1 + 1
    2
    sage: x = 3
    sage: y = 4

    sage: z = 5
    sage: x + y + \
    ....: z
    7