Skip to content

Commit d7fd1e2

Browse files
authored
Merge pull request #1219 from deven-gqc/master
fixes #1213
2 parents 8f994cd + 3445496 commit d7fd1e2

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

nbdev/doclinks.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,9 @@ def _iter_py_cells(p):
4949
cells = p.read_text().split("\n# %% ")
5050
for cell in cells[1:]:
5151
top,code = cell.split('\n', 1)
52-
try: nb,idx = top.split()
52+
try:
53+
*nb,idx = top.split()
54+
nb = ' '.join(nb)
5355
except ValueError: raise ValueError(f"Unexpected format in '{p}' at cell:\n```\n# %% {cell.strip()}.\n```\n"
5456
"The expected format is: '# %% {nb_path} {cell_idx}'.")
5557
nb_path = None if nb=='auto' else (p.parent/nb).resolve() # NB paths are stored relative to .py file

nbs/api/doclinks.ipynb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,9 @@
137137
" cells = p.read_text().split(\"\\n# %% \")\n",
138138
" for cell in cells[1:]:\n",
139139
" top,code = cell.split('\\n', 1)\n",
140-
" try: nb,idx = top.split()\n",
140+
" try:\n",
141+
" *nb,idx = top.split()\n",
142+
" nb = ' '.join(nb)\n",
141143
" except ValueError: raise ValueError(f\"Unexpected format in '{p}' at cell:\\n```\\n# %% {cell.strip()}.\\n```\\n\"\n",
142144
" \"The expected format is: '# %% {nb_path} {cell_idx}'.\")\n",
143145
" nb_path = None if nb=='auto' else (p.parent/nb).resolve() # NB paths are stored relative to .py file\n",

0 commit comments

Comments
 (0)