Show More
@@ -38,7 +38,8 b' from pygments.token import (' | |||||
38 | ) |
|
38 | ) | |
39 | from pygments.util import get_bool_opt |
|
39 | from pygments.util import get_bool_opt | |
40 |
|
40 | |||
41 |
|
41 | # Local | ||
|
42 | from IPython.testing.skipdoctest import skip_doctest | |||
42 |
|
43 | |||
43 | line_re = re.compile('.*?\n') |
|
44 | line_re = re.compile('.*?\n') | |
44 |
|
45 | |||
@@ -170,34 +171,36 b' class IPythonTracebackLexer(DelegatingLexer):' | |||||
170 | DelegatingLexer.__init__(self, IPyLexer, |
|
171 | DelegatingLexer.__init__(self, IPyLexer, | |
171 | IPythonPartialTracebackLexer, **options) |
|
172 | IPythonPartialTracebackLexer, **options) | |
172 |
|
173 | |||
173 |
|
174 | @skip_doctest | ||
174 | class IPythonConsoleLexer(Lexer): |
|
175 | class IPythonConsoleLexer(Lexer): | |
175 | """ |
|
176 | """ | |
176 | An IPython console lexer for IPython code-blocks and doctests, such as: |
|
177 | An IPython console lexer for IPython code-blocks and doctests, such as:: | |
|
178 | ||||
|
179 | .. sourcecode:: ipythoncon | |||
|
180 | ||||
|
181 | In [1]: a = 'foo' | |||
177 |
|
182 | |||
178 | .. sourcecode:: ipythoncon |
|
183 | In [2]: a | |
|
184 | Out[2]: 'foo' | |||
179 |
|
185 | |||
180 |
|
|
186 | In [3]: print a | |
|
187 | foo | |||
181 |
|
188 | |||
182 |
|
|
189 | In [4]: 1 / 0 | |
183 | Out[2]: 'foo' |
|
|||
184 |
|
190 | |||
185 | In [3]: print a |
|
|||
186 | foo |
|
|||
187 |
|
191 | |||
188 | In [4]: 1 / 0 |
|
|||
189 |
|
192 | |||
190 | Support is also provided for IPython exceptions. |
|
193 | Support is also provided for IPython exceptions. :: | |
191 |
|
194 | |||
192 | .. code-block:: ipythoncon |
|
195 | .. code-block:: ipythoncon | |
193 |
|
196 | |||
194 | In [1]: raise Exception |
|
197 | In [1]: raise Exception | |
195 | --------------------------------------------------------------------------- |
|
198 | --------------------------------------------------------------------------- | |
196 | Exception Traceback (most recent call last) |
|
199 | Exception Traceback (most recent call last) | |
197 | <ipython-input-1-fca2ab0ca76b> in <module>() |
|
200 | <ipython-input-1-fca2ab0ca76b> in <module>() | |
198 | ----> 1 raise Exception |
|
201 | ----> 1 raise Exception | |
199 |
|
202 | |||
200 | Exception: |
|
203 | Exception: | |
201 |
|
204 | |||
202 | """ |
|
205 | """ | |
203 | name = 'IPython console session' |
|
206 | name = 'IPython console session' |
General Comments 0
You need to be logged in to leave comments.
Login now