diff --git a/src/index.ts b/src/index.ts index f1f6a22..5c63959 100644 --- a/src/index.ts +++ b/src/index.ts @@ -28,7 +28,7 @@ function main() { } } if (event.text.length <= 2) return - if (!event.text.match(/^(\$+)([^$]+)\1$/m)) return + if (!event.text.match(/^(\$+)([^$]+)\1$/)) return const block = await logseq.Editor.getCurrentBlock() if (block === null) return openPopup(block.uuid, { diff --git a/src/popup.ts b/src/popup.ts index faa2d38..c16c072 100644 --- a/src/popup.ts +++ b/src/popup.ts @@ -26,7 +26,7 @@ export async function openPopup( let delim = logseq.settings?.preferDisplay ? '$$' : '$' let newline = logseq.settings?.preferMultiline ? '\n' : '' if (originalContent) { - const match = originalContent.match(/^(?\$+)(?\n*)(?.*)\2\1$/ms) + const match = originalContent.match(/^(?\$+)(?\n*)(?.*)\2\1$/s) if (match !== null && match.groups !== undefined) { originalValue = match.groups.content delim = match.groups.delim