Skip to content
Permalink
Browse files
Remove redundant check for similarity in tags, it is covered by the t…
…axonomy classifier
  • Loading branch information
ralsina committed Jul 25, 2018
1 parent b7632e5 commit 55d4420fec11698dd3d3ead466d136dc928deee7
Showing with 2 additions and 10 deletions.
  1. +1 −0 CHANGES.txt
  2. +1 −10 nikola/nikola.py
@@ -20,6 +20,7 @@ Bugfixes
non-default language (Issue #3112)
* Implement ``MARKDOWN_EXTENSION_CONFIGS`` properly (Issue #2970)
* Ignore ``.DS_Store`` when processing listings (Issue #3099)
* Remove redundant check for tag similarity (Mentioned in Issue #3123)

New in v8.0.0b2 (changes since Beta 1)
======================================
@@ -2111,16 +2111,7 @@ def scan_posts(self, really=False, ignore_quit=False, quiet=False):
for lang in self.config['TRANSLATIONS'].keys():
for tag in post.tags_for_language(lang):
_tag_slugified = utils.slugify(tag, lang)
if _tag_slugified in slugged_tags[lang]:
if tag not in self.posts_per_tag:
# Tags that differ only in case
other_tag = [existing for existing in self.posts_per_tag.keys() if utils.slugify(existing, lang) == _tag_slugified][0]
utils.LOGGER.error('You have tags that are too similar: {0} and {1}'.format(tag, other_tag))
utils.LOGGER.error('Tag {0} is used in: {1}'.format(tag, post.source_path))
utils.LOGGER.error('Tag {0} is used in: {1}'.format(other_tag, ', '.join([p.source_path for p in self.posts_per_tag[other_tag]])))
quit = True
else:
slugged_tags[lang].add(_tag_slugified)
slugged_tags[lang].add(_tag_slugified)
if post not in self.posts_per_tag[tag]:
self.posts_per_tag[tag].append(post)
self.tags_per_language[lang].extend(post.tags_for_language(lang))

0 comments on commit 55d4420

Please sign in to comment.