Merge: CallSite on AFor and ARange
[nit.git] / src / nitdoc.nit
index 591ecc6..4715068 100644 (file)
@@ -73,14 +73,10 @@ class NitdocContext
                toolcontext.option_context.add_option(opt_github_gitdir)
                toolcontext.option_context.add_option(opt_piwik_tracker)
                toolcontext.option_context.add_option(opt_piwik_site_id)
-               toolcontext.process_options
+               toolcontext.tooldescription = "Usage: nitdoc [OPTION]... <file.nit>...\nGenerates HTML pages of API documentation from Nit source files."
+               toolcontext.process_options(args)
                self.arguments = toolcontext.option_context.rest
 
-               if arguments.length < 1 then
-                       print "usage: nitdoc [options] file..."
-                       toolcontext.option_context.usage
-                       exit(0)
-               end
                self.process_options
 
                model = new Model
@@ -1814,7 +1810,7 @@ redef class AModule
 
        private fun full_markdown: String do
                if n_moduledecl != null and n_moduledecl.n_doc != null then
-                       return n_moduledecl.n_doc.full_markdown.html
+                       return n_moduledecl.n_doc.to_mdoc.full_markdown.write_to_string
                end
                return ""
        end
@@ -1841,7 +1837,7 @@ redef class AStdClassdef
        end
 
        private fun full_markdown: String do
-               if n_doc != null then return n_doc.full_markdown.html
+               if n_doc != null then return n_doc.to_mdoc.full_markdown.write_to_string
                return ""
        end
 
@@ -1865,7 +1861,7 @@ redef class APropdef
        end
 
        private fun full_markdown: String do
-               if n_doc != null then return n_doc.full_markdown.html
+               if n_doc != null then return n_doc.to_mdoc.full_markdown.write_to_string
                return ""
        end