nitdoc: do not repeat entries in the index.
authorMatthieu Auger <matthieu.auger@gmail.com>
Tue, 17 May 2011 17:31:16 +0000 (19:31 +0200)
committerJean Privat <jean@pryen.org>
Mon, 17 Oct 2011 14:04:18 +0000 (10:04 -0400)
Signed-off-by: Matthieu Auger <matthieu.auger@gmail.com>
Signed-off-by: Jean Privat <jean@pryen.org>

src/nitdoc.nit

index 437f837..72942e8 100644 (file)
@@ -80,9 +80,11 @@ class DocContext
        # Register an entity (for the index)
        fun register(e: MMEntity)
        do
-               _entities.add(e)
-               if e isa MMSrcModule then
-                       _mmmodule = e
+               if not _entities.has(e) then
+                       _entities.add(e)
+                       if e isa MMSrcModule then
+                               _mmmodule = e
+                       end
                end
        end