3

Markdown already ignores everything within a <div> element, and various other block-level elements. However, I need to tell Markdown to ignore everything within <code> blocks as well. Is there a way to tell Markdown to do this?

As an FYI, I am using BlueCloth.

Lester Peabody
  • 1,868
  • 3
  • 20
  • 42

2 Answers2

0

The Markdown spec does not specify how <code> blocks should be processed. What exact type of markup are you trying to get the Markdown processors to ignore?

Sim
  • 13,147
  • 9
  • 66
  • 95
0

Here is the Markdown Syntax page.

I'm not exactly sure what you want to achieve.

You have something like the following right?

#Heading

<code>
    $my = 'php code here';
</code>

Other text

Do you want your output to be like the one below?

<h1>Heading</h1>

<code>
    $my = 'php code here';
</code>

<p>Other text</p>

For code in markdown you have to indent the code by four spaces so what you should do is the following in your markdown source file.

#Heading

    $my = 'php code here';

Other text

The code is indented four spaces and markdown will surround it with and tags automatically.

Jerry Saravia
  • 3,737
  • 3
  • 24
  • 39