Skip to content

Commit c2f1965

Browse files
committed
Replite code: Remove empty lines
1 parent 9d98a8e commit c2f1965

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/jupyterlite_sphinx.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,8 @@ def __init__(
6060
def html(self):
6161
replite_options = self["replite_options"]
6262

63-
code_lines = [line.strip() for line in self["content"]]
63+
# Remove empty lines
64+
code_lines = ["" if not line.strip() else line for line in self["content"]]
6465
code = "\n".join(code_lines)
6566

6667
replite_options["code"] = code

0 commit comments

Comments
 (0)