Skip to content

Commit 14db636

Browse files
committed
strip trailing spaces after : to avoid poyo error
1 parent 4f247ae commit 14db636

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/resources/jupyter/notebook.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -477,6 +477,9 @@ def nb_cell_yaml_lines(lang, source):
477477
yaml_option = line[len(option_match.group()):]
478478
if (option_suffix):
479479
yaml_option = yaml_option.rstrip()[:-len(option_suffix)]
480+
# strip trailing spaces after : to avoid poyo error
481+
# (https://github.com/hackebrot/poyo/issues/30)
482+
yaml_option = re.sub(":\\s+$", ":", yaml_option)
480483
yaml_lines.append(yaml_option)
481484
continue
482485
break

0 commit comments

Comments
 (0)