nitlight: add a title on the html document
authorJean Privat <jean@pryen.org>
Fri, 30 May 2014 20:05:05 +0000 (16:05 -0400)
committerJean Privat <jean@pryen.org>
Fri, 30 May 2014 20:05:05 +0000 (16:05 -0400)
Signed-off-by: Jean Privat <jean@pryen.org>

src/nitlight.nit

index 85b2c1a..821cc37 100644 (file)
@@ -56,10 +56,12 @@ for mm in mmodules do
        if opt_last_line.value != 0 then v.last_line = opt_last_line.value
        if opt_ast.value then v.with_ast = true
        var page = null
+       var m = modelbuilder.mmodule2nmodule[mm]
        if not opt_fragment.value then
                page = new HTMLTag("html")
                page.add_raw_html """<head>
-               <meta charset="utf-8">"""
+               <meta charset="utf-8">
+               <title>file {{{m.location.file.filename}}}</title>"""
                if dir == null then
                        page.add_raw_html """
                        <style type="text/css">
@@ -71,7 +73,6 @@ for mm in mmodules do
                end
                page.add_raw_html "</head><body><pre>"
        end
-       var m = modelbuilder.mmodule2nmodule[mm]
        v.enter_visit(m)
        if not opt_fragment.value then
                page.add(v.html)