diff options
Diffstat (limited to 'lib/generate/site/glossary_indexer.js')
-rw-r--r-- | lib/generate/site/glossary_indexer.js | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/lib/generate/site/glossary_indexer.js b/lib/generate/site/glossary_indexer.js index d46e393..dc9c2d8 100644 --- a/lib/generate/site/glossary_indexer.js +++ b/lib/generate/site/glossary_indexer.js @@ -28,9 +28,6 @@ function Indexer(glossary) { "gi" ); - // debug - console.log('term regex =', this.termsRegex); - // page url => terms this.idx = { /* @@ -66,8 +63,6 @@ Indexer.prototype.text = function(nodes) { // Add page to glossary index Indexer.prototype.add = function(sections, url) { if(!(this.glossary && this.glossary.length > 0)) { - console.log('Glossary =', this.glossary); - console.log('No glossary to match'); return; } @@ -93,6 +88,10 @@ Indexer.prototype.add = function(sections, url) { }.bind(this)); }; +// Dump index as a string +Indexer.prototype.dump = function() { + return JSON.stringify(this.idx); +}; function regexEscape(s) { |