Permalink
Browse files

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 1a9b6a80d3c83ba0517089785cc7364bbf589ece
Showing with 6 additions and 6 deletions.
  1. +1 −1 nikola/__main__.py
  2. +1 −1 nikola/plugins/template/jinja.py
  3. +1 −1 nikola/plugins/template/mako.py
  4. +1 −1 nikola/post.py
  5. +2 −2 nikola/utils.py
View
@@ -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
@@ -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()
@@ -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()
View
@@ -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
View
@@ -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".
@@ -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."""

0 comments on commit 1a9b6a8

Please sign in to comment.