Skip to content

Commit

Permalink
Improved category slug clash test.
Browse files Browse the repository at this point in the history
  • Loading branch information
felixfontein committed May 10, 2015
1 parent 8c2f62d commit 18296cf
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion nikola/plugins/task/tags.py
Expand Up @@ -95,7 +95,8 @@ def gen_tasks(self):

if kw['category_path'] == kw['tag_path']:
tags = {self.slugify_tag_name(tag): tag for tag in self.site.posts_per_tag.keys()}
categories = {self.slugify_category_name(category)[0]: category for category in self.site.posts_per_category.keys()}
cats = {tuple(self.slugify_category_name(category)): category for category in self.site.posts_per_category.keys()}
categories = {k[0]: v for k, v in cats.items() if len(k) == 1}
intersect = set(tags.keys()) & set(categories.keys())
if len(intersect) > 0:
for slug in intersect:
Expand Down

0 comments on commit 18296cf

Please sign in to comment.