KyleRombach / wmd-new

Automatically exported from code.google.com/p/wmd-new
0 stars 0 forks source link

Chrome misformats the blockquote when clicked. #10

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Open your working WMD Editor in Chrome.
2. Click the blockquote button while the editor is blank.

Expected output:

> Blockquote

What happens instead:

Blockquote

Blockquote> BlockquoteBlockquote

Blockquote

The fix:

I unminified the source of wmd.js for StackOverflow.com and managed to find the 
fix for this issue.

1. Search the file for "wmd.Chunks.prototype.addBlankLines = function"
NOTE: StackOverflow calls this function "skipLines" instead of "addBlankLines", 
but other than this fix the functions are identical.

2. Within this function locate where two variables are assigned:

"var regexText;
var replacementText;"

3. Just after these variables add the following IF statement:

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

4. This fixes the chrome issue with block quotes and is the fix currently 
implemented by StackOverflow.com. It's working great on my end.

Original issue reported on code.google.com by Chevex...@gmail.com on 24 Mar 2011 at 2:55

GoogleCodeExporter commented 8 years ago
Thanks so much. Glad to see it work.Nice Job

Original comment by dipeshpo...@gmail.com on 2 May 2011 at 12:56

GoogleCodeExporter commented 8 years ago
As we have a solution, can someone with write access change the trunk code?

Original comment by sorin.sb...@gmail.com on 6 Jul 2011 at 7:22