nitdoc: Document constraints on `nitdoc_id`.
authorJean-Christophe Beaupré <jcbrinfo@users.noreply.github.com>
Fri, 12 Dec 2014 19:07:15 +0000 (14:07 -0500)
committerJean-Christophe Beaupré <jcbrinfo@users.noreply.github.com>
Thu, 18 Dec 2014 13:59:30 +0000 (08:59 -0500)
Signed-off-by: Jean-Christophe Beaupré <jcbrinfo@users.noreply.github.com>

src/doc/doc_model.nit

index 12fbf72..3a560f5 100644 (file)
@@ -35,7 +35,15 @@ redef class MEntity
        # HTML Escaped name
        fun nitdoc_name: String is abstract
 
-       # Used as HTML unique ids
+       # ID used as a HTML unique ID and in file names.
+       #
+       # **Must** match the following (POSIX ERE) regular expression:
+       #
+       # ~~~POSIX ERE
+       # ^[A-Za-z_][A-Za-z0-9._-]*$
+       # ~~~
+       #
+       # That way, the ID is always a valid URI component and a valid XML name.
        fun nitdoc_id: String is abstract
 
        # URL of this entity’s Nitdoc page.