![]() The rendering of a markdown file in GitHub or in GitHub pages uses traditional line breaks. Well, that sort of depends where you look. ![]() Note that even on GitHub which is far more developer centric than Discourse, the behavior defaults to return as a line break. Do you think it’s worth exploring that further as well? Maybe that’s the easiest place to start here.īut I’m also wondering whether there’s something more generic here as feedback/input we can provide upstream to commonmark to allow for blocks within a doc to use different rendering options. Within Discourse, BBCode blocks work well already for things like. In many ways, what we’re proposing here is exactly that. I’m thinking about something along the lines of the ``` syntax that can be prefixed and postfixed to a list of blocks to make linebreaks inside them rendered hard. Comment #41 has a proposal for this, but I simply don’t think we can come up with something that works in enough cases, so the second-best option would be to somehow mark a single paragraph, or a block of markdown, to use hard-rendered linebreaks? If we could somehow detect between the different types of “paragraphs” (or rather, distinguish between a paragraph and a group of lines) without adding markupt for that this would be great. However, a single user might have different needs in different documents and, as shown above, even different needs within a document. More specifically, this would mean you could turn this option on or off for a single user or perhaps even system. Even though this seems like a solution, it’s not, due to lack of granularity. The current spec says “A renderer may also provide an option to render soft line breaks as hard line breaks.”, which I take to mean that a rendere might have an option, like a commandline or configuration option, to render hardbreaks instead of softbreaks. There were some hints of exploring an idea like this in a few posts in this topic on the commonmark forum. I’m wondering if this is an opportunity to actually improve commonmark itself to support directives within a document for different rendering options. It made me think of something else though, that I want to float here to see what folks think. Hey, I’m pretty psyched about the idea proposed here to do a BBCode block.
0 Comments
Leave a Reply. |