From 282fc16e4988341b00afbe97bc2d4663cb0a31c2 Mon Sep 17 00:00:00 2001 From: Billiam Date: Sat, 9 Mar 2013 22:46:35 -0600 Subject: [PATCH] Adding excludeTags to markdown config. --- plugins/markdown.js | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/plugins/markdown.js b/plugins/markdown.js index a6ad08ac..10017994 100644 --- a/plugins/markdown.js +++ b/plugins/markdown.js @@ -9,7 +9,8 @@ var conf = env.conf.markdown; var defaultTags = [ "classdesc", "description", "params", "properties", "returns" ]; var parse = require('jsdoc/util/markdown').getParser(); -var tags; +var tags = []; +var excludeTags = []; /** * Process the markdown source in a doclet. The properties that should be @@ -36,15 +37,16 @@ function process(doclet) { // set up the list of "tags" (properties) to process if (conf && conf.tags) { tags = conf.tags.slice(); - - defaultTags.forEach(function(tag) { - if (tags.indexOf(tag) === -1) { - tags.push(tag); - } - }); -} else { - tags = defaultTags; } +// set up the list of default tags to exclude from processing +if (conf && conf.excludeTags) { + excludeTags = conf.excludeTags.slice(); +} +defaultTags.forEach(function(tag) { + if (excludeTags.indexOf(tag) === -1 && tags.indexOf(tag) === -1) { + tags.push(tag); + } +}); exports.handlers = { /**