Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Table is not working #260

Open
ps0002 opened this issue May 10, 2022 · 9 comments
Open

Table is not working #260

ps0002 opened this issue May 10, 2022 · 9 comments

Comments

@ps0002
Copy link

ps0002 commented May 10, 2022

Subject of the issue
Markdown tables aren't rendered correctly. The markdown code is rendered without any formatting. It was working before, After upgrading some of the UI-libs, table doesn't render properly.

My Environment:

"dependencies": {
"@blackbox-vision/ra-language-spanish": "~3.5.0",
"@material-ui/core": "~4.9.3",
"@material-ui/lab": "~4.0.0-alpha.45",
"@rehooks/local-storage": "~2.4.0",
"final-form-calculate": "~1.3.2",
"focus-trap-react": "~6.0.0",
"jsencrypt": "~3.0.0-rc.1",
"ra-i18n-polyglot": "~3.6.2",
"ra-language-english": "~3.6.2",
"ra-language-french": "~3.6.2",
"ra-language-italian": "~3.0.0",
"react-admin": "~3.10.3",
"react-dnd": "~10.0.2",
"react-dnd-html5-backend": "~10.0.2",
"remark-parse": "~9.0.0",
"remark-react": "~7.0.1",
"remove-markdown": "~0.3.0",
"slugify": "~1.4.4",
"swagger-ui-react": "~3.27.0",
"unified": "~8.4.2",
"react-markdown-editor-lite": "~1.0.2",
},
"peerDependencies": {
"react": ">=16.8.0",
"react-dom": ">=16.8.0"
},
"devDependencies": {
"@testing-library/jest-dom": "~5.11.4",
"@testing-library/react": "~11.0.0",
"@testing-library/user-event": "~12.1.6",
"fetch-mock": "~9.10.3",
"identity-obj-proxy": "~3.0.0",
"jest-environment-jsdom-sixteen": "~1.0.3",
"jest-localstorage-mock": "~2.4.2",
"kcd-scripts": "6.3.0",
"layer7-apihub-mock": "~1.0.0",
"react": ">=16.8.0",
"react-dom": ">=16.8.0",
"react-scripts": "~4.0.1",
"rimraf": "~3.0.2",
"typescript": "~4.1.2",
"recompose":"~0.30.0"
},

Actual Behaviour :
Screen Shot 2022-05-09 at 5 04 22 PM

@Tasin5541
Copy link

Did you find any fix? @ps0002

@Judert
Copy link

Judert commented Jun 2, 2022

How do you expect a table without remark-gfm or am I misunderstanding?

@Tasin5541
Copy link

How do you expect a table without remark-gfm or am I misunderstanding?

The demo doesn't use it. There's no mention of it in the readme. Although I'm using it since my last comment with the latest version of react-markdown. (Demo uses version 4+ I think, latest is 8+)

@Judert
Copy link

Judert commented Jun 2, 2022

The demo doesn't use react-markdown as far as I can remember, the one they were using had tables baked in. Is the issue fixed now?

@Judert
Copy link

Judert commented Jun 2, 2022

Regardless I don't see how parsing issues is react-markdown-editor-lites issue.

@Tasin5541
Copy link

The demo doesn't use react-markdown as far as I can remember, the one they were using had tables baked in. Is the issue fixed now?

This is the one I'm talking about. This uses react-markdown without gfm.

@Tasin5541
Copy link

Regardless I don't see how parsing issues is react-markdown-editor-lites issue.

It's not. But for someone who's working on markdown editor for the first time (like me), it seems like this library would do all the things that I can see on their demo. Would be beginner friendly if there was some mention of the libraries needed for table (gfm) and html (rehype) support.

@Judert
Copy link

Judert commented Jun 2, 2022

Oh I see, glad to hear you got it working though 👌

@ps0002
Copy link
Author

ps0002 commented Sep 30, 2022

Sorry for the late reply. I updated the remark-parse version from 7.1.2 to 9.0.0 to fix this issue. (All versions of package trim lower than 0.0.3 are vulnerable to Regular Expression Denial of Service (ReDoS) via trim().) elastic/eui#5543. However When I upgrade the library, table is not rendered properly. it is broken.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants