Github-style fenced code blocks
Jeff Barczewski
jeff.barczewski at gmail.com
Fri Sep 27 10:41:21 EDT 2013
And backticks work better for editors which aren't aware of the tilde
style.
It is much easier to type three backticks than it is three tildes too.
On Fri, Sep 27, 2013 at 7:04 AM, m ali ayas <dev at maliayas.com> wrote:
> AFAIK backticks are commonly used and known. It'd be good to support it
> in PHP Markdown Extra until a consensus spec rises.
>
> 2013-09-27 14:48 tarihinde, Michel Fortin yazdı:
> > 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:
> >
> > ```php
> > some php code
> > ```
> >
> > Replace those backticks with tildes and you get a valid fenced code
> block in PHP Markdown Extra:
> >
> > ~~~php
> > some php code
> > ~~~
> >
> > Of course, now Github also supports tilde for fenced code blocks. But
> their documentation only mention the backtick-based syntax.
> > <https://help.github.com/articles/github-flavored-markdown>
> >
> > If take a look at Babelmark 2, it seems that most implementations
> supporting one also support the other.
> > <
> http://johnmacfarlane.net/babelmark2/?normalize=1&text=```php%0Asome+php+code%0A```%0A
> >
> > <
> http://johnmacfarlane.net/babelmark2/?normalize=1&text=~~~php%0Asome+php+code%0A~~~%0A
> >
> >
> > I wondered if some of you have any opinion to share on this.
> >
>
> _______________________________________________
> Markdown-Discuss mailing list
> Markdown-Discuss at six.pairlist.net
> http://six.pairlist.net/mailman/listinfo/markdown-discuss
>
--
Jeff Barczewski
Founder of CodeWinds
http://codewinds.com/
Web developer training - screencasts, ebooks, webinars
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://six.pairlist.net/pipermail/markdown-discuss/attachments/20130927/48de6b14/attachment.html>
More information about the Markdown-Discuss
mailing list