NotionX / NotionX/react-notion-x

The equation component did not handle inline and block equations correctly.

Open
#301 7 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
5.4k
Forks
645
PR merge metrics
No merged PRs in 30d

Description

Description

When deal with block equations, we should set "displayMode" to True.
As shown below, the block formula should be centered instead of left:
image
Besides, some usages like "\tag" is only available in display mode, see:
image
The error is:
image
To solve this problem, we only need to add 'displayMode', and I already PR #281 .

Notion Test Page ID

This is my notion blog page which has this problem: pinn-blog
This is the origin notion page: pinn-notion

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

Start at the equation component and review the already-mentioned PR #281, which is the proposed resolution. Done means block equations are centered, inline equations remain inline, and usages such as \tag work in display mode.

Written by the indexing model from the issue text.

Assessment

Tech stack
react, typescript
Domain
frontend
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.