Links in Code Blocks

Jak Wings jakwings at gmail.com
Wed Mar 26 13:41:51 EDT 2014


Fenced code block is not in vanilla Markdown. "kramdown" can let you write this way:

<pre markdown="1" class="lang-markdown">
This code block contains an embedded [hyperlink](http://en.wikipedia.org/wiki/Hyperlink).
</pre>

It is really unusual to have links inside code block (which should be kept as is). So you'd better use raw HTML code instead of mixing them up.

<pre class="lang-markdown">
This code block contains an embedded <a href="http://en.wikipedia.org/wiki/Hyperlink">hyperlink</a>.
</pre>

On 2014-03-27, at 01:25+08:00, Tom Maynard <tom at maynard.com> wrote:


> Is it possible to have a live hyperlink *inside* a \`\`\`Code Block\`\`\`? Something like:

> ```markdown

> This code block contains an embedded [hyperlink](http://en.wikipedia.org/wiki/Hyperlink). Is it possible to render it as an active link instead of source?

> ```

> I realize that Markdown support already exists, but it doesn't work. And, I also realize that what I'm asking for is diametrically opposed to what a Code Block is meant to be (even one with syntax highlighting. It's a "WYSIWYG" functionality, and I'm trying to circumvent it (at least partially).

>

> Is there a way?

>

> _______________________________________________

> Markdown-Discuss mailing list

> Markdown-Discuss at six.pairlist.net

> http://six.pairlist.net/mailman/listinfo/markdown-discuss




More information about the Markdown-Discuss mailing list