private fun modules do
for mmodule in model.mmodules do
- if mmodule.is_fictive then continue
+ if mmodule.is_fictive or mmodule.is_test_suite then continue
var page = new NitdocModule(ctx, model, mainmodule, mmodule)
page.render.write_to_file("{ctx.output_dir.to_s}/{page.page_url}")
end
init do
for mmodule in model.mmodules do
- if mmodule.is_fictive then continue
+ if mmodule.is_fictive or mmodule.is_test_suite then continue
add_result_for(mmodule.name, mmodule.full_name, mmodule.nitdoc_url)
end
for mclass in model.mclasses do
var source = ctx.opt_source.value
if source == null then
var url = location.file.filename.simplify_path
- return "<a target='_blank' title='Show source' href=\"{url}\">View Source</a>"
+ return "<a target='_blank' title='Show source' href=\"{url.html_escape}\">View Source</a>"
end
# THIS IS JUST UGLY ! (but there is no replace yet)
var x = source.split_with("%f")
x = source.split_with("%L")
source = x.join(location.line_end.to_s)
source = source.simplify_path
- return "<a target='_blank' title='Show source' href=\"{source.to_s}\">View Source</a>"
+ return "<a target='_blank' title='Show source' href=\"{source.to_s.html_escape}\">View Source</a>"
end
# MProject description template
var article = mproject.tpl_article
article.subtitle = mproject.tpl_declaration
article.content = mproject.tpl_definition
- if mproject.mdoc != null then
- article.content = mproject.mdoc.tpl_short_comment
+ var mdoc = mproject.mdoc_or_fallback
+ if mdoc != null then
+ article.content = mdoc.tpl_short_comment
end
return article
end
var intros = mmodule.intro_mclassdefs(ctx.min_visibility).to_a
if not intros.is_empty then
mainmodule.linearize_mclassdefs(intros)
- var intros_art = new TplArticle.with_title("{mmodule.nitdoc_id}_intros", "Introduces")
+ var intros_art = new TplArticle.with_title("{mmodule.nitdoc_id}.intros", "Introduces")
var intros_lst = new TplList.with_classes(["list-unstyled", "list-labeled"])
for mclassdef in intros do
intros_lst.add_li mclassdef.tpl_list_item
var redefs = mmodule.redef_mclassdefs(ctx.min_visibility).to_a
if not redefs.is_empty then
mainmodule.linearize_mclassdefs(redefs)
- var redefs_art = new TplArticle.with_title("{mmodule.nitdoc_id}_redefs", "Redefines")
+ var redefs_art = new TplArticle.with_title("{mmodule.nitdoc_id}.redefs", "Redefines")
var redefs_lst = new TplList.with_classes(["list-unstyled", "list-labeled"])
for mclassdef in redefs do
redefs_lst.add_li mclassdef.tpl_list_item
redef_article.source_link = tpl_showsource(mclassdef.location)
article.add_child redef_article
# mpropdefs list
- var intros = new TplArticle.with_title("{mclassdef.nitdoc_id}_intros", "Introduces")
+ var intros = new TplArticle.with_title("{mclassdef.nitdoc_id}.intros", "Introduces")
var intros_lst = new TplList.with_classes(["list-unstyled", "list-labeled"])
for mpropdef in mclassdef.collect_intro_mpropdefs(ctx.min_visibility) do
intros_lst.add_li mpropdef.tpl_list_item
intros.content = intros_lst
redef_article.add_child intros
end
- var redefs = new TplArticle.with_title("{mclassdef.nitdoc_id}_redefs", "Redefines")
+ var redefs = new TplArticle.with_title("{mclassdef.nitdoc_id}.redefs", "Redefines")
var redefs_lst = new TplList.with_classes(["list-unstyled", "list-labeled"])
for mpropdef in mclassdef.collect_redef_mpropdefs(ctx.min_visibility) do
redefs_lst.add_li mpropdef.tpl_list_item
else
var cls_url = mprop.intro.mclassdef.mclass.nitdoc_url
var def_url = "{cls_url}#{mprop.nitdoc_id}"
- var lnk = new TplLink.with_title(def_url, mprop.name, "Go to introduction")
+ var lnk = new TplLink.with_title(def_url, mprop.nitdoc_name,
+ "Go to introduction")
title.add "redef "
title.add lnk
end
article.title_classes.add "signature"
article.summary_title = "{mprop.nitdoc_name}"
article.subtitle = main_mpropdef.tpl_namespace
- if main_mpropdef.mdoc != null then
- article.content = main_mpropdef.mdoc.tpl_comment
+ if main_mpropdef.mdoc_or_fallback != null then
+ article.content = main_mpropdef.mdoc_or_fallback.tpl_comment
end
- var subarticle = new TplArticle("{main_mpropdef.nitdoc_id}_redefs")
+ var subarticle = new TplArticle("{main_mpropdef.nitdoc_id}.redefs")
# Add redef in same `MClass`
if local_mpropdefs.length > 1 then
for mpropdef in local_mpropdefs do
end
# Add linearization
if lin.length > 1 then
- var lin_article = new TplArticle("{main_mpropdef.nitdoc_id}_lin")
+ var lin_article = new TplArticle("{main_mpropdef.nitdoc_id}.lin")
lin_article.title = "Inheritance"
var lst = new TplList.with_classes(["list-unstyled", "list-labeled"])
for mpropdef in lin do
private fun modules_list: Array[MModule] do
var sorted = new Array[MModule]
for mmodule in model.mmodule_importation_hierarchy do
- if mmodule.is_fictive then continue
+ if mmodule.is_fictive or mmodule.is_test_suite then continue
sorted.add mmodule
end
name_sorter.sort(sorted)
# Imports
var lst = new Array[MModule]
for dep in imports do
- if dep.is_fictive then continue
+ if dep.is_fictive or dep.is_test_suite then continue
if dep == mmodule then continue
lst.add(dep)
end
# Clients
lst = new Array[MModule]
for dep in clients do
- if dep.is_fictive then continue
+ if dep.is_fictive or dep.is_test_suite then continue
if dep == mmodule then continue
lst.add(dep)
end
fun tpl_dot(mmodules: Collection[MModule]): nullable TplArticle do
var poset = new POSet[MModule]
for mmodule in mmodules do
- if mmodule.is_fictive then continue
+ if mmodule.is_fictive or mmodule.is_test_suite then continue
poset.add_node mmodule
for omodule in mmodules do
- if mmodule.is_fictive then continue
+ if omodule.is_fictive or omodule.is_test_suite then continue
poset.add_node mmodule
if mmodule.in_importation < omodule then
poset.add_edge(mmodule, omodule)
classes.add "inherit"
var cls_url = mprop.intro.mclassdef.mclass.nitdoc_url
var def_url = "{cls_url}#{mprop.nitdoc_id}"
- var lnk = new TplLink(def_url, mprop.name)
- if mprop.intro.mdoc != null then lnk.title = mprop.intro.mdoc.short_comment
+ var lnk = new TplLink(def_url, mprop.nitdoc_name)
+ var mdoc = mprop.intro.mdoc_or_fallback
+ if mdoc != null then lnk.title = mdoc.short_comment
var item = new Template
item.add new TplLabel.with_classes(classes)
item.add lnk
var section = new TplSection.with_title("top", tpl_title)
section.subtitle = mclass.intro.tpl_declaration
var article = new TplArticle("comment")
- if mclass.mdoc != null then
- article.content = mclass.mdoc.tpl_comment
+ var mdoc = mclass.mdoc_or_fallback
+ if mdoc != null then
+ article.content = mdoc.tpl_comment
end
section.add_child article
return section