Skip to content

Commit 0962b9b

Browse files
seanpuejbweston
andauthored
Update jupyter_sphinx/execute.py
Co-Authored-By: Joseph Weston <[email protected]>
1 parent 2bee9c0 commit 0962b9b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

jupyter_sphinx/execute.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -410,7 +410,7 @@ def apply(self):
410410
source["linenos"] = True
411411
# Advance linenostart or reset it
412412
if node["continue_linenos"] or node["linenos"]:
413-
linenostart += len(source.rawsource.split("\n"))
413+
linenostart += source.rawsource.count("\n") + 1
414414
else:
415415
linenostart = 1
416416

0 commit comments

Comments
 (0)