Fix an issue where "tsdoc-inline-tag-missing-braces" and "tsdoc-tag-should-not-have-braces" were reported incorrectly

This commit is contained in:
Pete Gonzalez 2021-04-19 18:56:31 -07:00
Родитель 1116a0b0b3
Коммит e4aa4a4e3b
1 изменённых файлов: 4 добавлений и 4 удалений

Просмотреть файл

@ -233,15 +233,15 @@ export class NodeParser {
// The tag is defined, but it is used incorrectly
if (expectingInlineTag) {
this._parserContext.log.addMessageForTokenSequence(
TSDocMessageId.InlineTagMissingBraces,
`The TSDoc tag "${tagName}" is an inline tag; it must be enclosed in "{ }" braces`,
TSDocMessageId.TagShouldNotHaveBraces,
`The TSDoc tag "${tagName}" is not an inline tag; it must not be enclosed in "{ }" braces`,
tokenSequenceForErrorContext,
nodeForErrorContext
);
} else {
this._parserContext.log.addMessageForTokenSequence(
TSDocMessageId.TagShouldNotHaveBraces,
`The TSDoc tag "${tagName}" is not an inline tag; it must not be enclosed in "{ }" braces`,
TSDocMessageId.InlineTagMissingBraces,
`The TSDoc tag "${tagName}" is an inline tag; it must be enclosed in "{ }" braces`,
tokenSequenceForErrorContext,
nodeForErrorContext
);