From e43caf3189e2a05d43f5a81bc93c521249b08a36 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Mon, 11 Sep 2017 17:15:09 +0200 Subject: [PATCH] m.htmlsanity: actually add the highlight CSS class to inline code. So I don't have to add it manually every time. --- pelican-plugins/m/htmlsanity.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pelican-plugins/m/htmlsanity.py b/pelican-plugins/m/htmlsanity.py index 18172d58..a74aa1fc 100644 --- a/pelican-plugins/m/htmlsanity.py +++ b/pelican-plugins/m/htmlsanity.py @@ -208,10 +208,10 @@ class SaneHtmlTranslator(HTMLTranslator): if 'code' in classes: # filter 'code' from class arguments node['classes'] = [cls for cls in classes if cls != 'code'] - self.body.append(self.starttag(node, 'code', '')) + self.body.append(self.starttag(node, 'code', '', CLASS='highlight')) return self.body.append( - self.starttag(node, 'code', '')) + self.starttag(node, 'code', '', CLASS='highlight')) text = node.astext() # remove hard line breaks (except if in a parsed-literal block) if not isinstance(node.parent, nodes.literal_block): -- 2.30.2