JSDOC/Template.js
[gnome.introspection-doc-generator] / JSDOC / Packer.js
index c60f089..d04e630 100644 (file)
@@ -132,16 +132,20 @@ Packer.prototype = {
         lines.forEach(function(f) {
             
             if (/^\s*\//.test(f) || !/[a-z]+/i.test(f)) { // skip comments..
-                continue;
+                return;
             }
             if (/\.js$/.test(f)) {
                 _this.files.push( f);
                 // js file..
-                continue;
+                return;
             }
             
             //println("ADD"+ f.replace(/\./g, '/'));
-            _this.files.push( f.replace(/\./g, '/').replace(/\s+/g,'')+'.js');
+            var add = f.replace(/\./g, '/').replace(/\s+/g,'')+'.js';
+            if (_this.files.indexOf(f) > -1) {
+                return;
+            }
+            _this.files.push( add );
             
         })
     },