Use includes instead of indexOf

This commit is contained in:
Maximilian Krög
2022-08-05 00:36:16 +02:00
parent 5e34b9aa20
commit 0b945f2321
26 changed files with 50 additions and 57 deletions

View File

@@ -76,7 +76,7 @@ function shouldProcessString(tagName, text) {
let shouldProcess = true;
// we only want to process `@author` and `@see` tags that contain Markdown links
if ((tagName === 'author' || tagName === 'see') && text.indexOf('[') === -1) {
if ((tagName === 'author' || tagName === 'see') && !text.includes('[')) {
shouldProcess = false;
}