Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Disable Markdown for a block

Markdown syntax is often convenient to write blogs and comments;

But at times it interferes with the content when you would want to write a simple html

Is there a tag / syntax that asks markdown to ignore that part like the pre html tag?

If pre works, what if the markdown part needs to include an html tag?

like image 422
lprsd Avatar asked Mar 31 '09 13:03

lprsd


People also ask

Is Markdown still relevant?

Markdown is gaining popularity among writers, developers, and content creators due to its versatility. It is a free markup language you can use to format plain text and generate different outputs. It implies that you do not have to invest in expensive software anymore to create and publish diverse content.

What does ``` mean in Markdown?

} ``` Markdown coverts text with four leading spaces into a code block; with GFM you can wrap your code with ``` to create a code block without the leading spaces. Add an optional language identifier and your code with get syntax highlighting.


1 Answers

The original implementation of Markdown (by Gruber) and PHP Markdown don't format inside block-level HTML elements, so you can use <div>, for example:

Markdown text.

More markdown text.

<div>
Markdown ignores inside the div, you can do all sorts of crazy stuff:
<a href="http://www.stackoverflow.com">Stack Overflow</a>.
<blink>Is blink still supported?</blink>
</div>

Yet more markdown text.

Will get rendered as:

<p>Markdown text.</p>

<p>More markdown text.</p>

<div>
Markdown ignores inside the div, you can do all sorts of crazy stuff:
<a href="http://www.stackoverflow.com">Stack Overflow</a>.
<blink>Is blink still supported?</blink>
</div>

<p>Yet more markdown text.</p>
like image 174
Can Berk Güder Avatar answered Oct 11 '22 15:10

Can Berk Güder