react-markdown-editor-lite
react-markdown-editor-lite copied to clipboard
Table is not working
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 :
Did you find any fix? @ps0002
How do you expect a table without remark-gfm or am I misunderstanding?
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+)
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?
Regardless I don't see how parsing issues is react-markdown-editor-lites issue.
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.
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.
Oh I see, glad to hear you got it working though 👌
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().) https://github.com/elastic/eui/issues/5543. However When I upgrade the library, table is not rendered properly. it is broken.