From: Jean Privat Date: Fri, 23 Aug 2013 18:44:36 +0000 (-0400) Subject: markdown: add a toolcontext attribute X-Git-Tag: v0.6.1~13^2~8 X-Git-Url: http://nitlanguage.org markdown: add a toolcontext attribute Signed-off-by: Jean Privat --- diff --git a/src/markdown.nit b/src/markdown.nit index dd839c4..6653fc6 100644 --- a/src/markdown.nit +++ b/src/markdown.nit @@ -20,6 +20,8 @@ import html # The class that does the convertion from a `ADoc` to HTML private class Doc2Mdwn + var toolcontext: ToolContext + # The lines of the current code block, empty is no current code block var curblock = new Array[String] @@ -177,14 +179,16 @@ redef class ADoc # Build a `
` element that contains the full documentation in HTML fun full_markdown: HTMLTag do - var d2m = new Doc2Mdwn + var tc = new ToolContext + var d2m = new Doc2Mdwn(tc) return d2m.work(self) end # Build a `` element that contains the synopsys in HTML fun short_markdown: HTMLTag do - var d2m = new Doc2Mdwn + var tc = new ToolContext + var d2m = new Doc2Mdwn(tc) return d2m.short_work(self) end end diff --git a/src/nitunit.nit b/src/nitunit.nit index f31b405..05cdcc5 100644 --- a/src/nitunit.nit +++ b/src/nitunit.nit @@ -23,8 +23,6 @@ import parser_util class NitUnitExecutor super Doc2Mdwn - var toolcontext: ToolContext - # The name of the module to import var modname: String @@ -37,7 +35,7 @@ class NitUnitExecutor # Initialize a new e init(toolcontext: ToolContext, prefix: String, modname: String, testsuite: HTMLTag) do - self.toolcontext = toolcontext + super(toolcontext) self.prefix = prefix self.modname = modname self.testsuite = testsuite