chore: Fix eslint issues

This commit is contained in:
Sidharth Vinod
2024-06-30 01:19:11 +05:30
parent d9b2934a50
commit 1fad9e6eef
23 changed files with 73 additions and 56 deletions

View File

@@ -20,6 +20,7 @@ export abstract class AbstractMermaidTokenBuilder extends DefaultTokenBuilder {
// to restrict users, they mustn't have any non-whitespace characters after the keyword.
tokenTypes.forEach((tokenType: TokenType): void => {
if (this.keywords.has(tokenType.name) && tokenType.PATTERN !== undefined) {
// eslint-disable-next-line @typescript-eslint/no-base-to-string
tokenType.PATTERN = new RegExp(tokenType.PATTERN.toString() + '(?:(?=%%)|(?!\\S))');
}
});