From: Vladimír Vondruš Date: Fri, 8 Sep 2017 09:34:48 +0000 (+0200) Subject: m.htmlsanity: produce ­ instead of U+00AD in the hyphenate filter. X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~cjwatson/git?a=commitdiff_plain;h=2275721b066f4f76d83db3b36627f07c8fc75979;p=blog.git m.htmlsanity: produce ­ instead of U+00AD in the hyphenate filter. Makes the result easier to spot in the resulting HTML code. --- diff --git a/pelican-plugins/m/htmlsanity.py b/pelican-plugins/m/htmlsanity.py index 95e7eb2a..69605c63 100644 --- a/pelican-plugins/m/htmlsanity.py +++ b/pelican-plugins/m/htmlsanity.py @@ -469,7 +469,7 @@ def hyphenate(value, enable=None, lang=None): if lang is None: lang = hyphenation_lang if not enable: return value pyphen_ = pyphen.Pyphen(lang=lang) - return words_re.sub(lambda m: pyphen_.inserted(m.group(0), '\u00AD'), str(value)) + return words_re.sub(lambda m: pyphen_.inserted(m.group(0), '­'), str(value)) def configure_pelican(pelicanobj): pelicanobj.settings['JINJA_FILTERS']['render_rst'] = render_rst