Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix py2.7 issues with Unicode docstrings
Signed-off-by: Chris Warrick <kwpolska@gmail.com>
  • Loading branch information
Kwpolska committed Jul 28, 2015
1 parent d3d40ea commit 1a9b6a8
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion nikola/__main__.py
Expand Up @@ -365,7 +365,7 @@ def print_version():


def levenshtein(s1, s2):
"""Calculate the Levenshtein distance of two strings.
u"""Calculate the Levenshtein distance of two strings.
Implementation from Wikibooks:
https://en.wikibooks.org/w/index.php?title=Algorithm_Implementation/Strings/Levenshtein_distance&oldid=2974448#Python
Expand Down
2 changes: 1 addition & 1 deletion nikola/plugins/template/jinja.py
Expand Up @@ -69,7 +69,7 @@ def set_directories(self, directories, cache_folder):
self.create_lookup()

def inject_directory(self, directory):
"""Add a directory to the lookup and recreate it if its not there yet."""
"""Add a directory to the lookup and recreate it if it's not there yet."""
if directory not in self.directories:
self.directories.append(directory)
self.create_lookup()
Expand Down
2 changes: 1 addition & 1 deletion nikola/plugins/template/mako.py
Expand Up @@ -86,7 +86,7 @@ def set_directories(self, directories, cache_folder):
self.create_lookup()

def inject_directory(self, directory):
"""Add a directory to the lookup and recreate it if its not there yet."""
"""Add a directory to the lookup and recreate it if it's not there yet."""
if directory not in self.directories:
self.directories.append(directory)
self.create_lookup()
Expand Down
2 changes: 1 addition & 1 deletion nikola/post.py
Expand Up @@ -784,7 +784,7 @@ def source_ext(self, prefix=False):
"""Return the source file extension.
If `prefix` is True, a `.src.` prefix will be added to the resulting extension
if its equal to the destination extension.
if it's equal to the destination extension.
"""
ext = os.path.splitext(self.source_path)[1]
# do not publish PHP sources
Expand Down
4 changes: 2 additions & 2 deletions nikola/utils.py
Expand Up @@ -732,7 +732,7 @@ def remove_file(source):


def slugify(value, force=False):
"""Normalize string, convert to lowercase, remove non-alpha characters, convert spaces to hyphens.
u"""Normalize string, convert to lowercase, remove non-alpha characters, convert spaces to hyphens.
From Django's "django/template/defaultfilters.py".
Expand Down Expand Up @@ -1434,7 +1434,7 @@ def options2docstring(name, options):

class NikolaPygmentsHTML(HtmlFormatter):

"""A Nikola-specific modification of Pygments HtmlFormatter."""
"""A Nikola-specific modification of Pygments' HtmlFormatter."""

def __init__(self, anchor_ref, classes=None, linenos='table', linenostart=1):
"""Initialize formatter."""
Expand Down

0 comments on commit 1a9b6a8

Please sign in to comment.