nitdoc: replace `section:` prefix id by `.section` suffix
authorAlexandre Terrasa <alexandre@moz-code.org>
Tue, 26 May 2015 20:30:32 +0000 (16:30 -0400)
committerAlexandre Terrasa <alexandre@moz-code.org>
Fri, 29 May 2015 23:02:40 +0000 (19:02 -0400)
Because some HTML/JS tools do not like `:` in ids...

Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>

src/doc/doc_phases/doc_hierarchies.nit
src/doc/doc_phases/doc_intros_redefs.nit
src/doc/doc_phases/doc_structure.nit

index 9833dbd..4aeb52c 100644 (file)
@@ -41,7 +41,7 @@ end
 redef class MModulePage
        redef fun build_inh_list(v, doc) do
                var id = mentity.nitdoc_id
-               var section = new ImportationListSection("section:{id}.importation", mentity)
+               var section = new ImportationListSection("{id}.importation", mentity)
                var group = new PanelGroup("group:list", "List")
                var imports = self.imports.to_a
                v.name_sorter.sort(imports)
@@ -58,7 +58,7 @@ end
 redef class MClassPage
        redef fun build_inh_list(v, doc) do
                var id = mentity.nitdoc_id
-               var section = new InheritanceListSection("section:{id}.inheritance", mentity)
+               var section = new InheritanceListSection("{id}.inheritance", mentity)
                var group = new PanelGroup("group:list", "List")
                var parents = self.parents.to_a
                v.name_sorter.sort(parents)
index eb3f0a6..ec6ad29 100644 (file)
@@ -54,7 +54,7 @@ redef class DefinitionArticle
 
        # TODO this should move to MEntity?
        private fun build_mmodule_list(v: IntroRedefListPhase, doc: DocModel, mmodule: MModule) do
-               var section = new IntrosRedefsSection("article:{mentity.nitdoc_id}.intros_redefs", mentity)
+               var section = new IntrosRedefsSection("{mentity.nitdoc_id}.intros_redefs", mentity)
                var group = new PanelGroup("group:list", "List")
                var intros = mmodule.intro_mclassdefs(v.ctx.min_visibility).to_a
                doc.mainmodule.linearize_mclassdefs(intros)
@@ -68,7 +68,7 @@ redef class DefinitionArticle
 
        # TODO this should move to MEntity?
        private fun build_mclassdef_list(v: IntroRedefListPhase, doc: DocModel, mclassdef: MClassDef) do
-               var section = new IntrosRedefsSection("article:{mentity.nitdoc_id}.intros_redefs", mentity)
+               var section = new IntrosRedefsSection("{mentity.nitdoc_id}.intros_redefs", mentity)
                var group = new PanelGroup("group:list", "List")
                var intros = mclassdef.collect_intro_mpropdefs(v.ctx.min_visibility).to_a
                # FIXME avoid diff changes
index c173408..1384ef9 100644 (file)
@@ -53,7 +53,7 @@ redef class OverviewPage
                var mprojects = doc.model.mprojects.to_a
                var sorter = new MConcernRankSorter
                sorter.sort mprojects
-               var section = new ProjectsSection("section:projects")
+               var section = new ProjectsSection("projects.section")
                for mproject in mprojects do
                        section.add_child new DefinitionArticle("article:{mproject.nitdoc_id}.definition", mproject)
                end
@@ -75,7 +75,7 @@ end
 
 redef class MGroupPage
        redef fun apply_structure(v, doc) do
-               var section = new MEntitySection("section:{mentity.nitdoc_name}", mentity)
+               var section = new MEntitySection("{mentity.nitdoc_name}.section", mentity)
                root.add_child section
                if mentity.is_root then
                        section.add_child new IntroArticle("article:{mentity.mproject.nitdoc_id}.intro", mentity.mproject)
@@ -103,7 +103,7 @@ end
 
 redef class MModulePage
        redef fun apply_structure(v, doc) do
-               var section = new MEntitySection("section:{mentity.nitdoc_name}", mentity)
+               var section = new MEntitySection("{mentity.nitdoc_name}.section", mentity)
                root.add_child section
                section.add_child new IntroArticle("article:{mentity.nitdoc_id}.intro", mentity)
                var concerns = self.concerns
@@ -168,7 +168,7 @@ end
 
 redef class MClassPage
        redef fun apply_structure(v, doc) do
-               var section = new MEntitySection("section:{mentity.nitdoc_name}", mentity)
+               var section = new MEntitySection("{mentity.nitdoc_name}.section", mentity)
                root.add_child section
                section.add_child new IntroArticle("article:{mentity.nitdoc_id}.intro", mentity)
                var concerns = self.concerns
@@ -244,7 +244,7 @@ end
 
 redef class MPropertyPage
        redef fun apply_structure(v, doc) do
-               var section = new MEntitySection("section:{mentity.nitdoc_name}", mentity)
+               var section = new MEntitySection("{mentity.nitdoc_name}.section", mentity)
                root.add_child section
                section.add_child new IntroArticle("article:{mentity.nitdoc_id}.intro", mentity)
                var concerns = self.concerns