Skip to content

Commit

Permalink
Merge pull request #1096 from fastai/migrate-fix
Browse files Browse the repository at this point in the history
fix #1089
  • Loading branch information
hamelsmu authored Sep 19, 2022
2 parents cd6470a + e1cf54f commit d26ce6e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion nbdev/migrate.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ def _repl_v1shortcuts(cell):
# %% ../nbs/api/migrate.ipynb 50
def migrate_nb(path, overwrite=True):
"Migrate Notebooks from nbdev v1 and fastpages."
nbp = NBProcessor(path, procs=[FrontmatterProc, MigrateProc, _repl_v1shortcuts, _repl_v1dir])
nbp = NBProcessor(path, procs=[FrontmatterProc, MigrateProc, _repl_v1shortcuts, _repl_v1dir], rm_directives=False)
nbp.process()
if overwrite: write_nb(nbp.nb, path)
return nbp.nb
Expand Down
14 changes: 7 additions & 7 deletions nbs/api/migrate.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -669,7 +669,7 @@
"text/markdown": [
"---\n",
"\n",
"[source](https://github.com/fastai/nbdev/blob/master/nbdev/migrate.py#L118){target=\"_blank\" style=\"float:right; font-size:smaller\"}\n",
"[source](https://github.com/fastai/nbdev/blob/master/nbdev/migrate.py#L120){target=\"_blank\" style=\"float:right; font-size:smaller\"}\n",
"\n",
"### _repl_v1dir\n",
"\n",
Expand All @@ -680,7 +680,7 @@
"text/plain": [
"---\n",
"\n",
"[source](https://github.com/fastai/nbdev/blob/master/nbdev/migrate.py#L118){target=\"_blank\" style=\"float:right; font-size:smaller\"}\n",
"[source](https://github.com/fastai/nbdev/blob/master/nbdev/migrate.py#L120){target=\"_blank\" style=\"float:right; font-size:smaller\"}\n",
"\n",
"### _repl_v1dir\n",
"\n",
Expand Down Expand Up @@ -778,7 +778,7 @@
"text/markdown": [
"---\n",
"\n",
"[source](https://github.com/fastai/nbdev/blob/master/nbdev/migrate.py#L130){target=\"_blank\" style=\"float:right; font-size:smaller\"}\n",
"[source](https://github.com/fastai/nbdev/blob/master/nbdev/migrate.py#L132){target=\"_blank\" style=\"float:right; font-size:smaller\"}\n",
"\n",
"### _convert_callout\n",
"\n",
Expand All @@ -789,7 +789,7 @@
"text/plain": [
"---\n",
"\n",
"[source](https://github.com/fastai/nbdev/blob/master/nbdev/migrate.py#L130){target=\"_blank\" style=\"float:right; font-size:smaller\"}\n",
"[source](https://github.com/fastai/nbdev/blob/master/nbdev/migrate.py#L132){target=\"_blank\" style=\"float:right; font-size:smaller\"}\n",
"\n",
"### _convert_callout\n",
"\n",
Expand Down Expand Up @@ -922,7 +922,7 @@
"text/markdown": [
"---\n",
"\n",
"[source](https://github.com/fastai/nbdev/blob/master/nbdev/migrate.py#L137){target=\"_blank\" style=\"float:right; font-size:smaller\"}\n",
"[source](https://github.com/fastai/nbdev/blob/master/nbdev/migrate.py#L139){target=\"_blank\" style=\"float:right; font-size:smaller\"}\n",
"\n",
"### _convert_video\n",
"\n",
Expand All @@ -933,7 +933,7 @@
"text/plain": [
"---\n",
"\n",
"[source](https://github.com/fastai/nbdev/blob/master/nbdev/migrate.py#L137){target=\"_blank\" style=\"float:right; font-size:smaller\"}\n",
"[source](https://github.com/fastai/nbdev/blob/master/nbdev/migrate.py#L139){target=\"_blank\" style=\"float:right; font-size:smaller\"}\n",
"\n",
"### _convert_video\n",
"\n",
Expand Down Expand Up @@ -1013,7 +1013,7 @@
"#|export\n",
"def migrate_nb(path, overwrite=True):\n",
" \"Migrate Notebooks from nbdev v1 and fastpages.\"\n",
" nbp = NBProcessor(path, procs=[FrontmatterProc, MigrateProc, _repl_v1shortcuts, _repl_v1dir])\n",
" nbp = NBProcessor(path, procs=[FrontmatterProc, MigrateProc, _repl_v1shortcuts, _repl_v1dir], rm_directives=False)\n",
" nbp.process()\n",
" if overwrite: write_nb(nbp.nb, path)\n",
" return nbp.nb"
Expand Down

0 comments on commit d26ce6e

Please sign in to comment.