Chase Florell
Chase Florell

Reputation: 47387

Is there a more current version of WMD Markdown other than derobins?

I've started using derobins wmd markdown, and I really like the way it performs and integrates with my system. I do however have one MAJOR issue whereby the <ol> the <ul> and the <blockqote> doesn't work in Google Chrome or RockMelt.

I see that it's working here on StackOverflow, but I know they're making a lot of modifications.

Can anyone suggest a better version of WMD Markdown?

Here's a screenshot of what my editor looks like when I click "blockquote" in Chrome Google Chrome screws up wmd markdown

Upvotes: 4

Views: 261

Answers (2)

DisgruntledGoat
DisgruntledGoat

Reputation: 72550

UPDATE: Stack Overflow have released PageDown which fixes all the above bugs. Use that one instead. Original answer below...


Technically, the WMD version from Google Code is the official one maintained by some of the SO staff (browse the source to get your hands on the actual code). However, it still suffers from the bug you describe above. In fact it doesn't match up to SO's current version in many regards.

Yang's answer does work, but I took a look at what Stack Overflow actually does by de-minifying their addBlankLines function. They add the following code to said function between lines 1498 and 1500:

if (navigator.userAgent.match(/Chrome/)) {
    "X".match(/()./);
}

I can't fathom what on earth this code does, but it works! And it's what Stack Overflow is using right now so it can't be too bad :)

Upvotes: 3

Yang
Yang

Reputation: 202

open wmd.js, comment or delete line 2081 and line 2264, which is:

chunk.addBlankLines(); //-----line 2081

and:

chunk.addBlankLines(nLinesBefore, nLinesAfter, true); //------line 2264

I don't know why, but I got it from debug and debug for a full day. I hope it is usefull.

Upvotes: 2

Related Questions