Fix multiple inline snippets breaking

cshd
Dragory 2020-10-21 22:26:43 +03:00
parent ddb759f6ae
commit 9a88a6ef89
No known key found for this signature in database
GPG Key ID: 5F387BA66DF8AAC1
1 changed files with 1 additions and 1 deletions

View File

@ -207,7 +207,7 @@ class Thread {
}, {}); }, {});
text = text.replace( text = text.replace(
new RegExp(`${config.inlineSnippetStart}(.+)${config.inlineSnippetEnd}`, "i"), new RegExp(`${config.inlineSnippetStart}(.+?)${config.inlineSnippetEnd}`, "i"),
(orig, trigger) => { (orig, trigger) => {
const snippet = snippetMap[trigger.toLowerCase()]; const snippet = snippetMap[trigger.toLowerCase()];
return snippet != null ? snippet.body : orig; return snippet != null ? snippet.body : orig;