Skip to content

Commit

Permalink
fix: inline math should have no newline
Browse files Browse the repository at this point in the history
  • Loading branch information
AllanChain committed Aug 31, 2023
1 parent 59b06ac commit b54f387
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/popup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,8 @@ export async function openPopup(

let done = false
const updateLaTeX = async () => {
const insertedText = delim + newline + mfe.value + newline + delim
const insertedText =
delim === '$' ? delim + mfe.value + delim : delim + newline + mfe.value + newline + delim
const contentBeforeCaret = mfe.value ? contentBefore + insertedText : contentBefore
await logseq.Editor.updateBlock(uuid, contentBeforeCaret + contentAfter)
return contentBeforeCaret
Expand Down

0 comments on commit b54f387

Please sign in to comment.