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

Issues with two shortcodes used side by side #24

Closed stephenharris closed 11 years ago

stephenharris commented 11 years ago

Shortcodes continue to plauge MarkDown :S....

Shortcodes, in general, now work fine, except when two or more are used next to each other.

 [some_shortcode][some_shortcode]

becomes:

\[some_shortcode\]\[some_shortcode\]

in the editor.

'Next to' means there is no txt/html between them. Remember spaces are stripped, and blank line denotes paragraph, so:

 [some_shortcode]
 [some_shortcode]

Results in the shortcodes being escaped. But,

[some_shortcode]

[some_shortcode]

or

[some_shortcode]{two spaces}
[some_shortcode]

works fine.

The problem is in the HTML -> markdown conversion. That is using the above and saving, will mean the post renders correctly on the front-end, but not in the editor. Saving again without fixing the error it will cause the problems.

stephenharris commented 11 years ago

Workaround would be:

<div>
 [some_shortcode][some_shortcode]
</div>
stephenharris commented 11 years ago

Fixed with 56ed38d9a5aad75839de6a48c02f4b5c15fc4cf4