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

Some markdown elements are not kept after saving (or, when re-edit) #8

Closed dantewang closed 11 years ago

dantewang commented 11 years ago

These elements include:

- (bulleted list): after saving, it becomes *; `(two spaces at the end of a line to indicate new line): after saving, it becomes``<br /> ---------- (spilit line): becomes *********

I don't see such kind of problems in Stackoverflow's editor. Is it a bug or a problem related with Wordpress' internal implementation only?

Also found some places where the number of whitespaces increases after saving the article, for example, blockquoting.

stephenharris commented 11 years ago

Hi @dantewang

Really sorry for not being very active on here with WP-MarkDown - will be able to spend more time on it now.

As for these markdown changes this is because the entered MarkDown down is converted into HTML (and stored in the database), and then when you edit the post, the stored HTML is converted into MarkDown. It does this so only HTML is ever in the database, and so disabling the plug-in will not effect your posts.

Regarding whitespaces being added, can you post an example - I can't replicate the issue.

dantewang commented 11 years ago

For example, I use two spaces to start a new line. Here I use _ to indicate the spaces.

hello world__

And when I save the article, leave the editor, and then come back to edit, I will see

hello world<br >
stephenharris commented 11 years ago

Ah, yes - I think that was fixed in the recent round of updates (not yet released on WordPress repo) - but the changes have been made here.

I'm assuming you don't see a literal <br > - but instead a blank line that's been inserted?

dantewang commented 11 years ago

For the version I an currently using, I do see
when i edit my post. ÔÚ 2013-3-30 ÉÏÎç10:17£¬"Stephen Harris" notifications@github.comдµÀ£º

Ah, yes - I think that was fixed in the recent round of updates (not yet released on WordPress repo) - but the changes have been made here.

I'm assuming you don't see a literal
- but instead a blank line that's been inserted?

¡ª Reply to this email directly or view it on GitHubhttps://github.com/stephenharris/WP-MarkDown/issues/8#issuecomment-15668151 .

stephenharris commented 11 years ago

That's odd. Could replicate that - maybe try the latest from GitHub?

stephenharris commented 11 years ago

@dantewang Are you still experiencing this problem? If not can I close?

dantewang commented 11 years ago

@stephenharris

Sorry I don't know it... I am not using Wordpress anymore.

stephenharris commented 11 years ago

Cool, no problem. I could never reproduce the error, so can only assume that the 1.2 update did fix it...

Thanks!