Skip to content
Permalink
Browse files
Fix #2315 properly
Signed-off-by: Chris Warrick <kwpolska@gmail.com>
  • Loading branch information
Kwpolska committed Apr 8, 2016
1 parent 9e9f59f commit 5372c8b7a8354d83833eff87805554e13594ed9d
Showing with 2 additions and 4 deletions.
  1. +1 −0 CHANGES.txt
  2. +1 −4 nikola/nikola.py
@@ -7,6 +7,7 @@ Features
Bugfixes
--------

* Warn if a tag appears multiple times in a post (Issue #2315)
* Use binary I/O for ``.svg`` files in galleries
* Accept ``.svgz`` extension by default
* Don't randomly load plugins when Nikola is called with no arguments (Issue #2297)
@@ -1737,8 +1737,6 @@ def scan_posts(self, really=False, ignore_quit=False, quiet=False):
_tags_for_post = []
for tag in post.tags_for_language(lang):
_tag_slugified = utils.slugify(tag, lang)
_tags_for_post.append(_tag_slugified)

if _tag_slugified in slugged_tags[lang]:
if tag not in self.posts_per_tag:
# Tags that differ only in case
@@ -1750,10 +1748,9 @@ def scan_posts(self, really=False, ignore_quit=False, quiet=False):
elif tag in _tags_for_post:
utils.LOGGER.error("The tag {0} ({1}) appears more than once in post {2}.".format(tag, _tag_slugified, post.source_path))
quit = True
else:
utils.LOGGER.error("The tag {0} ({1}) is duplicated.".format(tag, _tag_slugified))
else:
slugged_tags[lang].add(_tag_slugified)
_tags_for_post.append(_tag_slugified)
self.tags_per_language[lang].extend(post.tags_for_language(lang))
self._add_post_to_category(post, post.meta('category'))

0 comments on commit 5372c8b

Please sign in to comment.