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:
50c9520
)
m.code: properly preserve backslashes in inline :code:.
author
Vladimír Vondruš
<mosra@centrum.cz>
Mon, 22 Jan 2018 12:10:55 +0000
(13:10 +0100)
committer
Vladimír Vondruš
<mosra@centrum.cz>
Mon, 22 Jan 2018 13:17:29 +0000
(14:17 +0100)
The test now passes again.
pelican-plugins/m/code.py
patch
|
blob
|
history
diff --git
a/pelican-plugins/m/code.py
b/pelican-plugins/m/code.py
index 45c1d82f769c476ed437a756600186b45428b38c..4bf996d3778475476b3e2138ee8432b4319d0508 100644
(file)
--- 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: