nitlanguage
/
nit.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge: Loose Tokens
[nit.git]
/
src
/
docdown.nit
diff --git
a/src/docdown.nit
b/src/docdown.nit
index
42c48c3
..
08a776e
100644
(file)
--- a/
src/docdown.nit
+++ b/
src/docdown.nit
@@
-235,6
+235,13
@@
private class Doc2Mdwn
fun process_code(n: HTMLTag, text: String, tag: nullable String)
do
fun process_code(n: HTMLTag, text: String, tag: nullable String)
do
+ # Do not try to highlight non-nit code.
+ if tag != null and tag != "" and tag != "nit" and tag != "nitish" then
+ n.append text
+ n.add_class("rawcode")
+ return
+ end
+
# Try to parse it
var ast = toolcontext.parse_something(text)
# Try to parse it
var ast = toolcontext.parse_something(text)