stephenharris / WP-MarkDown

WP-MarkDown plug-in. Allows Markdown to be enabled in posts, comments and bbPress forums.
http://wordpress.org/extend/plugins/wp-markdown/
112 stars 19 forks source link

BUG: Markdown strips down the spaces or indents inside the pre/code tag #41

Open manojhl opened 10 years ago

manojhl commented 10 years ago

When I write code inside the shortcode tags wp-markdown strips out the spaces and even new lines in between them.

stephenharris commented 10 years ago

Hi @manojhl - can you give me a test case? i.e. What you type in, what you expect, and what you actually get.

manojhl commented 10 years ago

@stephenharris sorry my mistake, the code was written inside a shorcode but markdownify don't consider this a code block so removed all indents inside it.... Is their any way around it, to notify not to strip off the indents inside a shortcode..filter!!!

manojhl commented 10 years ago

K I got it from the issue #38.. Thanks.. Closing it..

manojhl commented 10 years ago

@stephenharris this is not a shortcode issue it works fine with the default wp editor, markdown don't consider any code block inside short code. so removed all indents inside it. Sample

[tabx]
  <pre>
    <code class="language-css">
     * { 
       -webkit-box-sizing: border-box; 
           -moz-box-sizing: border-box; 
                    box-sizing: border-box; 
       }
    </code>
  </pre>
[/tabx]

I use this short code to display code and preview in tab-nav. The indents(spaces) are given to css properties for proper alignment and I have checked the database indents are removed..

It works fine outside the shortcode!!! :D