remarkjs / react-markdown

Markdown component for React
https://remarkjs.github.io/react-markdown/
MIT License
13.29k stars 876 forks source link

It's not parsing LaTex syntax correctly #784

Closed lyzy0906 closed 1 year ago

lyzy0906 commented 1 year ago

Initial checklist

Affected packages and versions

9.0.0

Link to runnable example

No response

Steps to reproduce

Here my original input text is a LaTex formula surrounded with \[ ... \] , but after it goes into the remark tree, the slash at the beginning is gone. Another slash before the last square is also gone. Then it is not going to identify LaTex formula correctly with the pattern \[ ... \] Please see the screenshot, I have console.log the input text, and the remark tree nodes.

image

Expected behavior

The slashes should be kept.

Actual behavior

The slashes are gone

Runtime

No response

Package manager

No response

OS

No response

Build and bundle tools

No response

wooorm commented 1 year ago

Read the readme on how to do math: https://github.com/remarkjs/react-markdown#use-remark-and-rehype-plugins-math.

github-actions[bot] commented 1 year ago

Hi! This was closed. Team: If this was fixed, please add phase/solved. Otherwise, please add one of the no/* labels.