* Add a tag to the doclet. * * @param {string} title - The title of the tag being added. * @param {string} [text] - The text of the tag being added.
(title, text)
| 322 | * @param {string} [text] - The text of the tag being added. |
| 323 | */ |
| 324 | addTag(title, text) { |
| 325 | const tagDef = jsdoc.tag.dictionary.lookUp(title); |
| 326 | const newTag = new jsdoc.tag.Tag(title, text, this.meta); |
| 327 | |
| 328 | if (tagDef && tagDef.onTagged) { |
| 329 | tagDef.onTagged(this, newTag); |
| 330 | } |
| 331 | |
| 332 | if (!tagDef) { |
| 333 | this.tags = this.tags || []; |
| 334 | this.tags.push(newTag); |
| 335 | } |
| 336 | |
| 337 | applyTag(this, newTag); |
| 338 | } |
| 339 | |
| 340 | /** |
| 341 | * Set the doclet's `memberof` property. |
no test coverage detected