chiark
/
gitweb
/
~cjwatson
/
blog.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2e17c78
)
m.htmlsanity: produce ­ instead of U+00AD in the hyphenate filter.
author
Vladimír Vondruš
<mosra@centrum.cz>
Fri, 8 Sep 2017 09:34:48 +0000
(11:34 +0200)
committer
Vladimír Vondruš
<mosra@centrum.cz>
Tue, 12 Sep 2017 10:06:26 +0000
(12:06 +0200)
Makes the result easier to spot in the resulting HTML code.
pelican-plugins/m/htmlsanity.py
patch
|
blob
|
history
diff --git
a/pelican-plugins/m/htmlsanity.py
b/pelican-plugins/m/htmlsanity.py
index 95e7eb2ad45696e32e70f5de278c4d8a26e98ca5..69605c63dba746065faa3393c13cd2fceee5fd2e 100644
(file)
--- 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