Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change Markdown rendering to GitHub-flavored renderer #1321

Closed
1 of 3 tasks
robbkidd opened this issue May 26, 2016 · 11 comments
Closed
1 of 3 tasks

Change Markdown rendering to GitHub-flavored renderer #1321

robbkidd opened this issue May 26, 2016 · 11 comments
Labels
Type: Chore non-critical maintenance of a project. Type: Enhancement Adds new functionality.

Comments

@robbkidd
Copy link
Contributor

robbkidd commented May 26, 2016

A couple of issues have come in that boil down to "Supermarket's Markdown renderer is not Github-flavored." Given the prevalence of community cookbooks whose READMEs are forged in the fires of GitHub, it is reasonable to expect that the README will render similarly on GitHub and on Supermarket.

Opening this issue as a roll-up to investigate configuring the existing renderer or changing it out for something that acts like GitHub's.

Some things to check:

  • support language-specific syntax highlighting in code blocks
  • does not render <!-- --> HTML comments
  • renders tables We do this already.
@robbkidd
Copy link
Contributor Author

Code syntax highlighting will have to come from Coderay, Rouge, or some other additional text processor to markup the text passed to our custom renderer.

Displaying HTML comments in the markdown appears to be the outcome of escaping the HTML in the custom Renderer.

@nellshamrell
Copy link
Contributor

nellshamrell commented Dec 8, 2016

We will not be getting to this in the next 6 months, but am open to revisiting in the future.

@robbkidd
Copy link
Contributor Author

robbkidd commented Mar 2, 2017

Adding options—that I'm not sure how I missed earlier—to this rollup in case it gets reopened in the future:

@iennae
Copy link
Contributor

iennae commented Oct 13, 2017

Currently tables that use html table syntax don't render. With #1622 this is fixed so tables do render properly.

@tas50 tas50 added Status: Incomplete A pull request that is not ready to be merged as noted by the author. Type: Enhancement Adds new functionality. and removed in progress labels Jan 2, 2019
@tas50 tas50 added Type: Chore non-critical maintenance of a project. and removed Chore labels Jan 14, 2019
@damacus
Copy link

damacus commented Apr 10, 2019

We've just noticed another subtle issue with the renderer.

  • [install](documentation/resource_apache2_install.md) isn't rendered correctly. This isn't github flavoured though 🤔 it's pretty standard markdown.

@robbkidd
Copy link
Contributor Author

I can picture how a relative URL like that which works in the context of GitHub won't work on Supermarket because the cookbook's documentation/resource_apache2_install.md (1) isn't packaged with the cookbook artifact and (2) isn't a part of the list of files from a cookbook that are processed for storing the README.

How much work do we want to put into Supermarket duplicating the GitHub experience and content?

@damacus
Copy link

damacus commented Apr 11, 2019

I think it would be nice for it to render the markdown to not look broken, even if the link is borked

@robbkidd
Copy link
Contributor Author

I think it would be nice for it to render the markdown to not look broken, even if the link is borked

Aaaah. I see now. Gotcha. 🤔

@robbkidd
Copy link
Contributor Author

Relative links got nerfed when we switched to the "safe" version of the markdown renderer. Relative links don't start with a string on the library's safe allow list.

I think while Supermarket is using Redcarpet for markdown rendering, it won't be supporting rendering relative links as links. There's an attempt at switching over to GitHub's own markdown rendering pipeline, but the test failures there need addressing.

@damacus
Copy link

damacus commented Apr 12, 2019

I think we have a good work around then, we just won't make them relative and always point at master/blob

@tas50 tas50 removed the Status: Incomplete A pull request that is not ready to be merged as noted by the author. label Jul 5, 2021
@tas50
Copy link
Contributor

tas50 commented Aug 24, 2021

I think we've solved this one enough at this point that we can potentially close it out. If we run into additional rendering issues we should raise them 1 at a time to track/fix

@tas50 tas50 closed this as completed Aug 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Chore non-critical maintenance of a project. Type: Enhancement Adds new functionality.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants