If so, you can have a look at the gfm plugin,
CommonmarkRenderer in particular (might also have a look at HtmlRenderer, but it's a bit more complex)
These renderers deal with Content model, you can think of it as some sort of IR between source code and an output format.
If you find that you need some info closer to the source code, it's also possible, just need to add a different extension
You can have a look at
SingleModuleGeneration to learn about the main stages and extension points.
Hope this helps!