Skip to content

Commit bdfba5a

Browse files
authored
Merge pull request #29 from jbweston/bugfix/newlines
strip unecessary newlines when content is loaded from a file
2 parents deef1f6 + 61e2643 commit bdfba5a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

jupyter_sphinx/execute.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ def run(self):
144144
)
145145
try:
146146
with open(filename) as f:
147-
content = f.readlines()
147+
content = [line.rstrip() for line in f.readlines()]
148148
except (IOError, OSError):
149149
raise IOError(
150150
'File {} not found or reading it failed'.format(filename)

0 commit comments

Comments
 (0)