Skip to content

Commit

Permalink
Fix getnikola/nikola#2862 — update tags plugin
Browse files Browse the repository at this point in the history
Signed-off-by: Chris Warrick <kwpolska@gmail.com>
  • Loading branch information
Kwpolska committed Jul 5, 2017
1 parent 160ff31 commit 3457b4b
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions v7/tags/tags.py
Expand Up @@ -37,7 +37,7 @@
from nikola.utils import bytes_str, LOGGER, req_missing, sys_decode, unicode_str
from nikola.plugins.compile.ipynb import flag as ipy_flag
if ipy_flag:
from nikola.plugins.compile.ipynb import current_nbformat, ipy_modern, nbformat
from nikola.plugins.compile.ipynb import current_nbformat, nbformat


def add_tags(site, tags, filepaths, dry_run=False):
Expand Down Expand Up @@ -681,10 +681,7 @@ def _replace_ipynb_tags(post, tags):
metadata['tags'] = ','.join(tags)

with io.open(post.source_path, "w+", encoding="utf8") as fd:
if ipy_modern:
nbformat.write(nb, fd, 4)
else:
nbformat.write(nb, fd, 'ipynb')
nbformat.write(nb, fd, 4)


def _replace_tags_line(post, tags):
Expand Down

0 comments on commit 3457b4b

Please sign in to comment.