•  
      request #14639 Render Markdown content with a CommonMark interpreter
    Infos
    #14639
    Thomas Gerbet (tgerbet)
    2020-03-06 11:48
    2020-03-05 15:36
    15882
    Details
    Render Markdown content with a CommonMark interpreter
    Tuleap uses michelf/php-markdown [0] to render Markdown which is nice but it is a specific Markdown implementation and Markdown does not have a specification (at least not one without too much ambiguities). This lead to different behaviors between different Markdown consumers: a same content can looks fine on one and be completely broken on another.

    In order to solve that CommonMark [1] has been developed [2] and is now used (with some extensions) by large users like GitHub [3] and GitLab [4]. It would be nice to use a CommonMark implementation in Tuleap as well (yeah no more broken README.md when mirroring repositories o/).

    There is a well maintained and high quality library in PHP [5] to render CommonMark content. A nice side effect is that this library can easily be extended so it would be possible for us to do smart things when rendering a Markdown file in a Git repositories like having the capability to have links to files in the repo or to display images located in the repository.



    [0] https://github.com/michelf/php-markdown
    [1] https://commonmark.org/
    [2] https://xkcd.com/927/
    [3] https://github.blog/2017-03-14-a-formal-spec-for-github-markdown/
    [4] https://about.gitlab.com/blog/2019/06/13/how-we-migrated-our-markdown-processing-to-commonmark/
    [5] https://github.com/thephpleague/commonmark
    Other
    Empty
    Empty
    • [ ] enhancement
    • [ ] internal improvement
    Empty
    Stage
    Thomas Gerbet (tgerbet)
    Closed
    2020-03-06
    Attachments
    Empty
    References

    Follow-ups

    User avatar
    Thomas Gerbet (tgerbet)2020-03-06 11:48
    • Summary
      -Render Markdwon content with a CommonMark interpreter 
      +Render Markdown content with a CommonMark interpreter