Require single quotes

This commit is contained in:
valadaptive
2023-12-02 13:04:51 -05:00
parent a06f1e8ad6
commit a37f874e38
76 changed files with 4135 additions and 4134 deletions

View File

@ -3,7 +3,7 @@ import { power_user } from './power-user.js';
// Showdown extension to make chat separators (dinkuses) ignore markdown formatting
export const markdownExclusionExt = () => {
if (!power_user) {
console.log("Showdown-dinkus extension: power_user wasn't found! Returning.");
console.log('Showdown-dinkus extension: power_user wasn\'t found! Returning.');
return []
}
@ -21,7 +21,7 @@ export const markdownExclusionExt = () => {
}
const escapedExclusions = combinedExcludeString
.split(",")
.split(',')
.filter((element) => element.length > 0)
.map((element) => `(${element.split('').map((char) => `\\${char}`).join('')})`);
@ -31,9 +31,9 @@ export const markdownExclusionExt = () => {
return [];
}
const replaceRegex = new RegExp(`^(${escapedExclusions.join("|")})\n`, "gm");
const replaceRegex = new RegExp(`^(${escapedExclusions.join('|')})\n`, 'gm');
return [{
type: "lang",
type: 'lang',
regex: replaceRegex,
replace: ((match) => match.replace(replaceRegex, `\u0000${match} \n`))
}];