diff --git a/IPython/nbconvert/filters/highlight.py b/IPython/nbconvert/filters/highlight.py index 85cc522..d374479 100644 --- a/IPython/nbconvert/filters/highlight.py +++ b/IPython/nbconvert/filters/highlight.py @@ -95,4 +95,4 @@ def _pygment_highlight(cell, output_formatter, language='ipython'): else: lexer = get_lexer_by_name(language, stripall=True) - return pygements_highlight(cell, lexer, output_formatter) + return pygements_highlight(cell['input'], lexer, output_formatter) diff --git a/IPython/nbconvert/filters/tests/test_highlight.py b/IPython/nbconvert/filters/tests/test_highlight.py index df25a42..18ca1b5 100644 --- a/IPython/nbconvert/filters/tests/test_highlight.py +++ b/IPython/nbconvert/filters/tests/test_highlight.py @@ -60,6 +60,6 @@ class TestHighlight(TestsBase): def _try_highlight(self, method, test, tokens): """Try highlighting source, look for key tokens""" - results = method(test) + results = method({'input': test}) for token in tokens: assert token in results