nitdoc: replace `concern:` prefix id by `.concern` suffix
authorAlexandre Terrasa <alexandre@moz-code.org>
Tue, 26 May 2015 20:43:33 +0000 (16:43 -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_structure.nit
src/doc/html_templates/html_model.nit

index d29a5df..fe75b8d 100644 (file)
@@ -92,7 +92,7 @@ redef class MGroupPage
                mentity.booster_rank = 0
                section.add_child new ConcernsArticle("{mentity.nitdoc_id}.concerns", mentity, concerns)
                for mentity in concerns do
-                       var ssection = new ConcernSection("concern:{mentity.nitdoc_id}", mentity)
+                       var ssection = new ConcernSection("{mentity.nitdoc_id}.concern", mentity)
                        if mentity isa MModule then
                                ssection.add_child new DefinitionArticle("{mentity.nitdoc_id}.definition", mentity)
                        end
@@ -119,7 +119,7 @@ redef class MModulePage
                section.add_child new ConcernsArticle("{mentity.nitdoc_id}.concerns", mentity, concerns)
                # reference list
                for mentity in concerns do
-                       var ssection = new ConcernSection("concern:{mentity.nitdoc_id}", mentity)
+                       var ssection = new ConcernSection("{mentity.nitdoc_id}.concern", mentity)
                        if mentity isa MModule then
                                var mclasses = mclasses_for_mmodule(mentity).to_a
                                v.name_sorter.sort(mclasses)
@@ -190,7 +190,7 @@ redef class MClassPage
                section.add_child constructors
                section.add_child new ConcernsArticle("{mentity.nitdoc_id}.concerns", mentity, concerns)
                for mentity in concerns do
-                       var ssection = new ConcernSection("concern:{mentity.nitdoc_id}", mentity)
+                       var ssection = new ConcernSection("{mentity.nitdoc_id}.concern", mentity)
                        if mentity isa MModule then
                                var mprops = mproperties_for(mentity)
                                var by_kind = new PropertiesByKind.with_elements(mprops)
@@ -259,7 +259,7 @@ redef class MPropertyPage
                mentity.intro.mclassdef.mmodule.booster_rank = 0
                section.add_child new ConcernsArticle("{mentity.nitdoc_id}.concerns", mentity, concerns)
                for mentity in concerns do
-                       var ssection = new ConcernSection("concern:{mentity.nitdoc_id}", mentity)
+                       var ssection = new ConcernSection("{mentity.nitdoc_id}.concern", mentity)
                        if mentity isa MModule then
                                # Add mproperties
                                var mpropdefs = mpropdefs_for(mentity).to_a
index bc8ccbe..46953d9 100644 (file)
@@ -686,7 +686,7 @@ redef class MConcern
        private fun html_concern_item: ListItem do
                var lnk = html_link
                var tpl = new Template
-               tpl.add new Link.with_title("#concern:{nitdoc_id}", lnk.text, lnk.title)
+               tpl.add new Link.with_title("#{nitdoc_id}.concern", lnk.text, lnk.title)
                var comment = html_short_comment
                if comment != null then
                        tpl.add ": "