tests: tests.sh detects directories before trying to execute them
[nit.git] / src / doc / doc_down.nit
index 1c77939..60ed50b 100644 (file)
@@ -27,7 +27,7 @@ redef class MDoc
        var full_comment: String is lazy do return content.join("\n").html_escape
 
        # Synopsys in a template
-       var tpl_short_comment: Streamable is lazy do
+       var tpl_short_comment: Writable is lazy do
                var res = new Template
                var syn = nitdoc_inline_processor.process(content.first)
                res.add "<span class=\"synopsys nitdoc\">{syn}</span>"
@@ -36,7 +36,7 @@ redef class MDoc
        end
 
        # Full comment in a template
-       var tpl_comment: Streamable is lazy do
+       var tpl_comment: Writable is lazy do
                var res = new Template
                var lines = content.to_a
                res.add "<div class=\"nitdoc\">"
@@ -143,6 +143,10 @@ private class NitdocDecorator
        end
 end
 
+# Decorator for span elements.
+#
+# Because inline comments can appear as span elements,
+# InlineDecorator do not decorate things like paragraphs or headers.
 private class InlineDecorator
        super NitdocDecorator
 
@@ -150,6 +154,10 @@ private class InlineDecorator
                v.emit_in block
        end
 
+       redef fun add_headline(v, block) do
+               v.emit_in block
+       end
+
        redef fun add_code(v, block) do
                # Try to parse code
                var ast = toolcontext.parse_something(block.block.text.to_s)