|
I was implementing markdown parser in my project and ran into a problem where links with relative paths were redirecting to a page and clearing state (acting as standard anchors) due to page reload. React Router Link component or useNavigate() secures the page reload and keeps the state. I was suggested to use marked-react for this but it didn't solve my problem. Could you please provide solution for replacing anchors with Link component? |
Answered by
sibiraj-s
Sep 29, 2023
Replies: 1 comment 1 reply
|
can you try custom renderer. Example can be found here. https://github.com/sibiraj-s/marked-react#syntax-highlight-code-blocks I will add the custom renderer to the Readme as a separate block. |
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
It will be like this