diff --git a/eris/tools.py b/eris/tools.py index 6ac1c57..9cf3364 100755 --- a/eris/tools.py +++ b/eris/tools.py @@ -154,7 +154,7 @@ def _syntax_highlight(text, lexer, style): def _syntax_highlight_using_path(text, path): - lexer = pygments.lexers.get_lexer_for_filename(path, text) + lexer = pygments.lexers.get_lexer_for_filename(path, text, stripnl=False) style = pygments.styles.get_style_by_name(os.environ["PYGMENT_STYLE"]) return _syntax_highlight(text, lexer, style) diff --git a/tests/golden-files/results/contents-hi3_py b/tests/golden-files/results/contents-hi3_py index 9e9eed2..25d6b2e 100644 --- a/tests/golden-files/results/contents-hi3_py +++ b/tests/golden-files/results/contents-hi3_py @@ -1,2 +1,4 @@ +  +  def hi():   print("hi") \ No newline at end of file diff --git a/tests/golden-files/results/python_gut-hi3_py b/tests/golden-files/results/python_gut-hi3_py index cb7ff1a..38d0e11 100644 --- a/tests/golden-files/results/python_gut-hi3_py +++ b/tests/golden-files/results/python_gut-hi3_py @@ -1 +1,3 @@ +  +  def hi(): \ No newline at end of file