mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
Require single quotes
This commit is contained in:
@ -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`))
|
||||
}];
|
||||
|
Reference in New Issue
Block a user