-
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? |
Beta Was this translation helpful? Give feedback.
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. |
Beta Was this translation helpful? Give feedback.
It will be like this