Skip to content

Commit

Permalink
Fix #2315 properly
Browse files Browse the repository at this point in the history
Signed-off-by: Chris Warrick <kwpolska@gmail.com>
  • Loading branch information
Kwpolska committed Apr 8, 2016
1 parent 9e9f59f commit 5372c8b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
1 change: 1 addition & 0 deletions CHANGES.txt
Expand Up @@ -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)
Expand Down
5 changes: 1 addition & 4 deletions nikola/nikola.py
Expand Up @@ -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
Expand All @@ -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'))

Expand Down

0 comments on commit 5372c8b

Please sign in to comment.