auto_super_init: handle the case of constructors redefinition (instead of infinitivel...
[nit.git] / src / test_markdown.nit
index 6a0f27c..6e6ccc3 100644 (file)
@@ -16,6 +16,7 @@
 module test_markdown
 
 import modelize_property
+import highlight
 import markdown
 
 redef class ModelBuilder
@@ -43,6 +44,16 @@ redef class ModelBuilder
        end
 end
 
+redef class MModule
+       redef fun href do return "#{to_s}"
+end
+redef class MClassDef
+       redef fun href do return "#{to_s}"
+end
+redef class MPropDef
+       redef fun href do return "#{to_s}"
+end
+
 var toolcontext = new ToolContext
 
 var opt_full = new OptionBool("Process also imported modules", "--full")
@@ -91,8 +102,22 @@ h5 {font-weight:bold;}
 </head><body>"""
 
 if opt_full.value then
-       for m in model.mmodules do
-               modelbuilder.test_markdown(page, m)
+       for p in model.mprojects do
+               page.add_raw_html "<h1 id='P{p.name}'>project {p.name}</h2>"
+               var mdoc = p.mdoc
+               if mdoc != null then
+                       page.add mdoc.full_markdown
+               end
+               for g in p.mgroups do
+                       mdoc = g.mdoc
+                       if mdoc != null then
+                               page.add_raw_html "<h2 id='G{g.full_name}'>group {g.full_name}</h2>"
+                               page.add mdoc.full_markdown
+                       end
+                       for m in g.mmodules do
+                               modelbuilder.test_markdown(page, m)
+                       end
+               end
        end
 else
        for m in mmodules do