Fix inline snippets only working once per reply

cshd
Dragory 2020-10-27 21:15:54 +02:00
parent a2140b71f8
commit ec95b52615
No known key found for this signature in database
GPG Key ID: 5F387BA66DF8AAC1
1 changed files with 1 additions and 1 deletions

View File

@ -208,7 +208,7 @@ class Thread {
let unknownSnippets = new Set(); let unknownSnippets = new Set();
text = text.replace( text = text.replace(
new RegExp(`${config.inlineSnippetStart}(\\s*\\S+?\\s*)${config.inlineSnippetEnd}`, "i"), new RegExp(`${config.inlineSnippetStart}(\\s*\\S+?\\s*)${config.inlineSnippetEnd}`, "ig"),
(orig, trigger) => { (orig, trigger) => {
trigger = trigger.trim(); trigger = trigger.trim();
const snippet = snippetMap[trigger.toLowerCase()]; const snippet = snippetMap[trigger.toLowerCase()];