Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 18296cf

Browse files
committedMay 10, 2015
Improved category slug clash test.
1 parent 8c2f62d commit 18296cf

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed
 

Diff for: ‎nikola/plugins/task/tags.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,8 @@ def gen_tasks(self):
9595

9696
if kw['category_path'] == kw['tag_path']:
9797
tags = {self.slugify_tag_name(tag): tag for tag in self.site.posts_per_tag.keys()}
98-
categories = {self.slugify_category_name(category)[0]: category for category in self.site.posts_per_category.keys()}
98+
cats = {tuple(self.slugify_category_name(category)): category for category in self.site.posts_per_category.keys()}
99+
categories = {k[0]: v for k, v in cats.items() if len(k) == 1}
99100
intersect = set(tags.keys()) & set(categories.keys())
100101
if len(intersect) > 0:
101102
for slug in intersect:

0 commit comments

Comments
 (0)
Please sign in to comment.