Skip to content

Commit e264661

Browse files
committed
fix order of categories
1 parent d1aed70 commit e264661

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

nbdev/migrate.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
# %% ../nbs/api/migrate.ipynb 5
1818
def _cat_slug(fmdict):
1919
"Get the partial slug from the category front matter."
20-
slug = '/'.join(sorted(fmdict.get('categories', '')))
20+
slug = '/'.join(fmdict.get('categories', ''))
2121
return '/' + slug if slug else ''
2222

2323
# %% ../nbs/api/migrate.ipynb 7

nbs/api/migrate.ipynb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@
8080
"#|export\n",
8181
"def _cat_slug(fmdict):\n",
8282
" \"Get the partial slug from the category front matter.\"\n",
83-
" slug = '/'.join(sorted(fmdict.get('categories', '')))\n",
83+
" slug = '/'.join(fmdict.get('categories', ''))\n",
8484
" return '/' + slug if slug else '' "
8585
]
8686
},
@@ -93,7 +93,7 @@
9393
"source": [
9494
"#|hide\n",
9595
"_fm1 = _get_fm('../../tests/2020-09-01-fastcore.ipynb')\n",
96-
"test_eq(_cat_slug(_fm1), '/fastai/fastcore')\n",
96+
"test_eq(_cat_slug(_fm1), '/fastcore/fastai')\n",
9797
"\n",
9898
"_fm2 = _get_fm('../../tests/2020-02-20-test.ipynb')\n",
9999
"test_eq(_cat_slug(_fm2), '/jupyter')"

0 commit comments

Comments
 (0)