From b0b3674c5713a97e8973e19705108ff93894186f Mon Sep 17 00:00:00 2001 From: =?utf8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Mon, 22 Jan 2018 13:10:55 +0100 Subject: [PATCH] m.code: properly preserve backslashes in inline :code:. The test now passes again. --- pelican-plugins/m/code.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pelican-plugins/m/code.py b/pelican-plugins/m/code.py index 45c1d82f..4bf996d3 100644 --- a/pelican-plugins/m/code.py +++ b/pelican-plugins/m/code.py @@ -173,6 +173,10 @@ class Include(docutils.parsers.rst.directives.misc.Include): return codeblock.run() def code(role, rawtext, text, lineno, inliner, options={}, content=[]): + # In order to properly preserve backslashes + i = rawtext.find('`') + text = rawtext.split('`')[1] + set_classes(options) classes = [] if 'classes' in options: -- 2.30.2