From 1fbc5f63e06517ef22ac1f4c9b0ecd0224e021ad 2013-12-18 23:03:00 From: Joris Van den Bossche Date: 2013-12-18 23:03:00 Subject: [PATCH] Set prompt_manager.width to zero for each new document to prevent misaligned Out prompts --- diff --git a/IPython/sphinxext/ipython_directive.py b/IPython/sphinxext/ipython_directive.py index 354bd29..6630190 100644 --- a/IPython/sphinxext/ipython_directive.py +++ b/IPython/sphinxext/ipython_directive.py @@ -707,6 +707,7 @@ class IPythonDirective(Directive): if not self.state.document.current_source in self.seen_docs: self.shell.IP.history_manager.reset() self.shell.IP.execution_count = 1 + self.shell.IP.prompt_manager.width = 0 self.seen_docs.add(self.state.document.current_source) # and attach to shell so we don't have to pass them around