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
Allow users to configure markdown rendering #1492
Comments
I would recommend against customization of markdown. Having a number of options will add a lot of code paths in an area that is already difficult to test. I would suggest using a standardized markdown implementation that aligns with CommonMark plus the liquid tags. Maybe offering an escape hatch were authors can disable markdown and switch to HTML for advanced features. |
CommonMark specifies how both hard line breaks and soft line breaks should be treated. The problem in #575 is that dev.to's parser seems to generate hard line breaks ( Though CommonMark does say: "A renderer may also provide an option to render soft line breaks as hard line breaks." |
Note that Github has a different behaviour with respect to line breaks for Issues and other places. I find this pretty strange and annoying. |
Any update on this? |
A workaround for this is to use prettier post.md --prose-wrap never That way you don't need to manually remove the newlines, and can write the post as you want. |
As per forem/forem#1492 the dev.to renderer interprets line breaks in markdown as actual linebreaks. Removing this formatting flag stops articles looking weird because of odd linebreak behaviour. Co-authored-by: evil-liskov <69952973+evil-liskov@users.noreply.github.com>
As per forem/forem#1492 the dev.to renderer interprets line breaks in markdown as actual linebreaks. Removing this formatting flag stops articles looking weird because of odd linebreak behaviour. Co-authored-by: evil-liskov <69952973+evil-liskov@users.noreply.github.com>
Is your feature request related to a problem? Please describe.
Markdown can be handled in a few ways and some people will have preferences for certain things. Makes sense to let people choose how they want their markdown handled.
Describe the solution you'd like
To start, let's add the option for our markdown parser to ignore certain line-breaks. See #575 for more info. This is a setting users should be able to toggle through their settings page.
The text was updated successfully, but these errors were encountered: