logseq / logseq/logseq

Deviating behavior on making selection inline math

Open
#6,777 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

:type/enhancement editor:autocomplete
Dominant language
Clojure
Stars
45k
Forks
2.8k
Avg merge
1d 22h
Merged PRs (30d)
105

Description

### What happened?

For underline, bold, etc it is possible to select a text and then writing two characters corresponding to the type requested (such as = =). The text selected is not deleted then, control characters added on each side of selection.

For inline math, the selected text is removed but start and end $$ $$ is added. The expected behaviour I think is to keep the text and add $$ on each side.

### Reproduce the Bug

1 select test in block
2 type $$
3 observe selection being deleted.

### Expected Behavior

_No response_

### Screenshots

_No response_

### Desktop Platform Information

windows, logseq 0.8.7

### Mobile Platform Information

_No response_

### Additional Context

_No response_

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the issue in Logseq 0.8.7 by selecting text in a block and typing $$, then compare this behavior with the existing underline and bold selection handling. The fix is complete when the selected text remains and $$ is inserted on both sides of it.

Written by the indexing model from the issue text.

Assessment

Tech stack
clojure
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.