atom/markdown-preview

Provide service for rendering markdown to HTML

appelgriebsch opened this issue · 1 comments

When working on the atom-ide-datatip package I was re-creating basic functionality to render the markdown delivered by the Language Server into HTML that can be displayed as part of an overlay. By doing so I currently miss some of the advanced features such as syntax highlighting of code snippets in the markdown string.

After briefly looking into the rendering code here (lib/renderer.coffee) I was thinking of the possibility to introduce a consumable service here that will allow other Atom packages to interact with the markdown renderer to get properly formatted output.

What's your opinion on that? If you find this suitable for the current package I would start investigating this further and provide you a PR on that.

Thanks for reaching out.

This is a complicated subject and provoked much discussion in our team meeting. Here are the highlights:

  1. The Markdown rendering in atom/markdown-preview doesn't match github.com's rendering (see the many issues regarding that here)
  2. If a "canonical Markdown rendering" service were to be provided, it should be from atom/atom, not atom/markdown-preview
  3. Integrating 100%-compliant (or even quite reasonably compliant) github.com Markdown rendering into Atom is not something that the maintainer team is going to be taking on in the foreseeable future

For the above reasons, we don't believe that providing a Markdown rendering service from atom/markdown-preview is ever going to be the correct design. Additionally, we won't be tackling a Markdown rendering service in atom/atom in the foreseeable future. If you want to match the Markdown rendering you see here, I recommend using the roaster nom package that this package uses directly or the marked npm package that roaster depends on for Markdown rendering.