microsoft / tsdoc

A doc comment standard for TypeScript
https://tsdoc.org/
MIT License
4.68k stars 131 forks source link

tsdoc-unnecessary-backslash false positive #362

Open cowwoc opened 12 months ago

cowwoc commented 12 months ago

Given the following description:

/**
 * <ul>
 * <li>Lines always end with <code>\n</code> or <code>\0</code>. The former denotes a newline. The latter
 * denotes the end of the string.</li>
 * </ul>
*/

tsdoc-unnecessary-backslash complains about \n and \0: tsdoc-unnecessary-backslash: A backslash can only be used to escape a punctuation character.

Expected behavior: the documentation should contain the literal string \n and \0.