X-Git-Url: http://nitlanguage.org diff --git a/src/doc/term/term.nit b/src/doc/term/term.nit index 5010fc9..7d490e4 100644 --- a/src/doc/term/term.nit +++ b/src/doc/term/term.nit @@ -15,7 +15,8 @@ module term import commands::commands_parser -import templates::templates_term +import templates::term_model +import templates::md_commands redef class CommandParser @@ -221,13 +222,12 @@ redef class CmdEntityCode else print title end - if no_color == null or not no_color then + var node = self.node + if (no_color == null or not no_color) and node != null then var ansi = render_code(node) - if ansi != null then - print "~~~" - print ansi.write_to_string - print "~~~" - end + print "~~~" + print ansi.write_to_string + print "~~~" else printn mentity.cs_source_code end