Github-style fenced code blocks
contact at alanhogan.com
Fri Sep 27 11:57:20 EDT 2013
I just used the tilde style today on GitHub, before reading this thread. Honestly, it's hard to remember what supports what; I would prefer for all implementations to support all three styles (back-tick, tilde, indented) in order to maximize portability and minimize surprise.
(StackOverflow gets a lot of requested for fenced code blocks. Consensus on Meta SO is "yep, we need 'em, and probably with either delimiter" but no one is actually implementing them on SO yet, as I recall.)
> On Sep 27, 2013, at 4:48 AM, Michel Fortin <michel.fortin at michelf.ca> wrote:
> I get a lot of requests for Github-style fenced code blocks in PHP Markdown Extra. While I despite the syntax -- it also happens to be a valid code span! -- I wonder whether I should relent on this. It seems to be bothering a lot of people (even those who know about the tilde-based fenced code block syntax).
> In Github-Flavored Markdown, a code block works like this:
> some php code
> Replace those backticks with tildes and you get a valid fenced code block in PHP Markdown Extra:
> some php code
> Of course, now Github also supports tilde for fenced code blocks. But their documentation only mention the backtick-based syntax.
> If take a look at Babelmark 2, it seems that most implementations supporting one also support the other.
> I wondered if some of you have any opinion to share on this.
> Michel Fortin
> michel.fortin at michelf.ca
> Markdown-Discuss mailing list
> Markdown-Discuss at six.pairlist.net
More information about the Markdown-Discuss