This rule can auto-escape certain characters that are input within block and tag descriptions.
This rule may be desirable if your text is known not to contain HTML or Markdown and you therefore do not wish for it to be accidentally interpreted as such by the likes of Visual Studio Code or if you wish to view it escaped within it or your documentation.
(TODO)
This option escapes all <
and &
characters (except those followed by
whitespace which are treated as literals by Visual Studio Code). Defaults to
false
.
This option escapes the first backtick (`
) in a paired sequence.
Defaults to false
.
Context | everywhere |
Tags | `` |
Recommended | false |
Settings | |
Options | escapeHTML , escapeMarkdown |
The following patterns are considered problems:
/**
* Some things to escape: <a> and > and `test`
*/
// Message: You must include either `escapeHTML` or `escapeMarkdown`
/**
* Some things to escape: <a> and > and ઼ and `test`
*/
// "jsdoc/text-escaping": ["error"|"warn", {"escapeHTML":true}]
// Message: You have unescaped HTML characters < or &
/**
* Some things to escape: <a> and > and `test`
*/
// "jsdoc/text-escaping": ["error"|"warn", {"escapeMarkdown":true}]
// Message: You have unescaped Markdown backtick sequences
/**
* Some things to escape:
* <a> and > and `test`
*/
// "jsdoc/text-escaping": ["error"|"warn", {"escapeHTML":true}]
// Message: You have unescaped HTML characters < or &
/**
* Some things to escape:
* <a> and > and `test`
*/
// "jsdoc/text-escaping": ["error"|"warn", {"escapeMarkdown":true}]
// Message: You have unescaped Markdown backtick sequences
/**
* @param {SomeType} aName Some things to escape: <a> and > and `test`
*/
// "jsdoc/text-escaping": ["error"|"warn", {"escapeHTML":true}]
// Message: You have unescaped HTML characters < or & in a tag
/**
* @param {SomeType} aName Some things to escape: <a> and > and `test`
*/
// "jsdoc/text-escaping": ["error"|"warn", {"escapeMarkdown":true}]
// Message: You have unescaped Markdown backtick sequences in a tag
/**
* @param {SomeType} aName Some things to escape:
* <a> and > and `test`
*/
// "jsdoc/text-escaping": ["error"|"warn", {"escapeHTML":true}]
// Message: You have unescaped HTML characters < or & in a tag
/**
* @param {SomeType} aName Some things to escape:
* <a> and > and `test`
*/
// "jsdoc/text-escaping": ["error"|"warn", {"escapeMarkdown":true}]
// Message: You have unescaped Markdown backtick sequences in a tag
The following patterns are not considered problems:
/**
* Some things to escape: <a> and > and `test`
*/
// "jsdoc/text-escaping": ["error"|"warn", {"escapeHTML":true}]
/**
* Some things to escape: <a> and > and \`test`
*/
// "jsdoc/text-escaping": ["error"|"warn", {"escapeMarkdown":true}]
/**
* Some things to escape: < and &
*/
// "jsdoc/text-escaping": ["error"|"warn", {"escapeHTML":true}]
/**
* Some things to escape: `
*/
// "jsdoc/text-escaping": ["error"|"warn", {"escapeMarkdown":true}]
/**
* @param {SomeType} aName Some things to escape: <a> and > and `test`
*/
// "jsdoc/text-escaping": ["error"|"warn", {"escapeHTML":true}]
/**
* @param {SomeType} aName Some things to escape: <a> and > and \`test`
*/
// "jsdoc/text-escaping": ["error"|"warn", {"escapeMarkdown":true}]
/**
* @param {SomeType} aName Some things to escape: < and &
*/
// "jsdoc/text-escaping": ["error"|"warn", {"escapeHTML":true}]
/**
* @param {SomeType} aName Some things to escape: `
*/
// "jsdoc/text-escaping": ["error"|"warn", {"escapeMarkdown":true}]
/**
* Nothing
* to escape
*/
// "jsdoc/text-escaping": ["error"|"warn", {"escapeHTML":true}]