From: Fernando P. <fpe...@gm...> - 2009-09-17 03:49:00
|
Howdy, this fixes the ipython console sphinx extension to mark up output prompts as well. Mind if I put it in? Thanks, f maqroll[sphinxext]> diff -u ipython_console_highlighting.py ~/research/papers/nitime/sphinxext/ipython_console_highlighting.py --- ipython_console_highlighting.py 2009-08-26 00:03:06.000000000 -0700 +++ /home/fperez/research/papers/nitime/sphinxext/ipython_console_highlighting.py 2009-09-11 18:03:19.000000000 -0700 @@ -77,8 +77,11 @@ [(0, Generic.Prompt, continue_prompt.group())])) curcode += line[continue_prompt.end():] elif output_prompt is not None: + # Use the 'error' token for output. We should probably make + # our own token, but error is typicaly in a bright color like + # red, so it works fine for our Output prompts. insertions.append((len(curcode), - [(0, Generic.Output, output_prompt.group())])) + [(0, Generic.Error, output_prompt.group())])) curcode += line[output_prompt.end():] else: if curcode: |