mirror of
https://github.com/jsdoc/jsdoc.git
synced 2025-12-08 19:46:11 +00:00
simplify logic
This commit is contained in:
parent
97dc742654
commit
7dfefd7910
@ -28,14 +28,10 @@ exports.validate = function(tag, tagDef, meta) {
|
||||
if (!tagDef && !env.conf.tags.allowUnknownTags) {
|
||||
logger.error( buildMessage(tag.title, meta, 'is not a known tag') );
|
||||
}
|
||||
else if (!tag.text) {
|
||||
if (tagDef.mustHaveValue) {
|
||||
else if (!tag.text && tagDef.mustHaveValue) {
|
||||
logger.error( buildMessage(tag.title, meta, 'requires a value') );
|
||||
}
|
||||
}
|
||||
else {
|
||||
if (tagDef.mustNotHaveValue) {
|
||||
else if (tag.text && tagDef.mustNotHaveValue) {
|
||||
logger.error( buildMessage(tag.title, meta, 'does not permit a value') );
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user