nitlanguage
/
nit.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
71d14a2
)
markdown: escape the meta information of code block in html
author
Jean Privat
<jean@pryen.org>
Thu, 10 Sep 2015 13:25:08 +0000
(09:25 -0400)
committer
Jean Privat
<jean@pryen.org>
Thu, 10 Sep 2015 13:37:03 +0000
(09:37 -0400)
Signed-off-by: Jean Privat <jean@pryen.org>
lib/markdown/markdown.nit
patch
|
blob
|
history
diff --git
a/lib/markdown/markdown.nit
b/lib/markdown/markdown.nit
index
613e1a4
..
b9e2f6a
100644
(file)
--- a/
lib/markdown/markdown.nit
+++ b/
lib/markdown/markdown.nit
@@
-758,8
+758,11
@@
class HTMLDecorator
end
redef fun add_code(v, block) do
- if block isa BlockFence and block.meta != null then
- v.add "<pre class=\"{block.meta.to_s}\"><code>"
+ var meta = block.meta
+ if meta != null then
+ v.add "<pre class=\""
+ append_value(v, meta)
+ v.add "\"><code>"
else
v.add "<pre><code>"
end