So some questions to make sure Iām on the same page as you @moiseychek. Are you talking about how I got the sytanx higlighting? or something else? Can you describe in more detail what is your tring to do and what troubles your having?
As to the first code snippet, it setting a function to be used by the marked Renderer, the bit that takes markdown and translates it to html, and creating a callback for links to return the link in a diffrent format then the default., the callback gets called with the href, title and text for that link.
The React documentation covers what dangerouslySetInnerHTML is and why it exists. I highly recommend going through the documention when you can since its pretty good.