Skip to content
Permalink
Browse files

Improved category slug clash test.

  • Loading branch information
felixfontein committed May 10, 2015
1 parent 8c2f62d commit 18296cfcf56792a3ee6e4c9300afade4a2557a71
Showing with 2 additions and 1 deletion.
  1. +2 −1 nikola/plugins/task/tags.py
@@ -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:

0 comments on commit 18296cf

Please sign in to comment.