stable
Clone or download
request #14639: Move to a CommonMark interpreter to render Markdown-like content
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]. Starting to use it in Tuleap is nice for users bceause they can expect a similar behavior than the one they are already used to. This contribution moves away from michelf/php-markdown and start using thephpleague/commonmark as a replacement. [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 Change-Id: Idfaf1fb28d66e56049b1533ac5933886efdd83d6
Modified Files
Name | ||||
---|---|---|---|---|
M | plugins/git/include/GitPHP/controller/Controller_Tree.php | +2 | −2 | Go to diff View file |
M | plugins/git/tests/integration/GitXmlImporterTest.php | +1 | −2 | Go to diff View file |
A | src/common/Markdown/CommonMarkInterpreter.php | +57 | −0 | Go to diff View file |
R | src/common/markdown/ContentInterpretor.php | Go to diff View file | ||
M | src/common/Widget/Note/ProjectNote.php | +2 | −0 | Go to diff View file |
M | src/common/plugin/PluginManager.class.php | +1 | −1 | Go to diff View file |
M | src/common/templating/mustache/SiteContentRenderer.php | +3 | −3 | Go to diff View file |
M | src/composer.json | +1 | −1 | Go to diff View file |
M | src/composer.lock | +75 | −47 | Go to diff View file |