src/doc/commands: clean `commands_docdown`
authorAlexandre Terrasa <alexandre@moz-code.org>
Tue, 12 Jun 2018 16:23:39 +0000 (12:23 -0400)
committerAlexandre Terrasa <alexandre@moz-code.org>
Fri, 22 Jun 2018 03:42:27 +0000 (23:42 -0400)
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>

src/doc/commands/commands_docdown.nit

index 95bdee9..1699454 100644 (file)
@@ -15,8 +15,8 @@
 # Doc down related queries
 module commands_docdown
 
-import commands::commands_html
-import commands::commands_md
+import commands_md
+import markdown
 
 # Retrieve the MDoc summary
 #
@@ -25,7 +25,7 @@ class CmdSummary
        super CmdComment
 
        # Markdown processor used to parse the headlines
-       var markdown_processor: nullable MarkdownProcessor = null is optional, writable
+       var markdown_processor: MarkdownProcessor is writable
 
        # Resulting summary
        #
@@ -37,12 +37,6 @@ class CmdSummary
                if not res isa CmdSuccess then return res
                var mentity = self.mentity.as(not null)
 
-               var markdown_processor = self.markdown_processor
-               if markdown_processor == null then
-                       markdown_processor = new MarkdownProcessor
-                       self.markdown_processor = markdown_processor
-               end
-
                var mdoc = self.mdoc
                if mdoc == null then
                        mdoc = if fallback then mentity.mdoc_or_fallback else mentity.mdoc