1
0
mirror of https://github.com/gryf/jekyll-rst.git synced 2025-12-19 20:38:06 +01:00

modify for python3

(cherry picked from commit 04b37d3313fbc31f22cf26534257b43e2840bdc4)
This commit is contained in:
wuyingren
2017-10-13 22:27:07 +08:00
committed by Roman Dobosz
parent c6a78ef0b5
commit 5b8eef7d05

View File

@@ -51,8 +51,8 @@ class Pygments(Directive):
# Construct cache filename # Construct cache filename
cache_file = None cache_file = None
content_text = u'\n'.join(self.content) content_text = u'\n'.join(self.content).encode('utf-8')
cache_file_name = '%s-%s.html' % (lexer_name, hashlib.md5(content_text).hexdigest()) cache_file_name = u'%s-%s.html' % (lexer_name, hashlib.md5(content_text).hexdigest())
cached_path = os.path.join(PYGMENTS_CACHE_DIR, cache_file_name) cached_path = os.path.join(PYGMENTS_CACHE_DIR, cache_file_name)
# Look for cached version, otherwise parse # Look for cached version, otherwise parse