Skip to content

Commit

Permalink
fixup paste code
Browse files Browse the repository at this point in the history
  • Loading branch information
Chris authored and parndt committed Jan 27, 2011
1 parent 2c69113 commit e251402
Showing 1 changed file with 4 additions and 1 deletion.
Expand Up @@ -1479,7 +1479,10 @@ WYMeditor.editor.prototype.paste = function(sData) {
}
} else {
if ((aP.length -1) == x) {
contentAfterBreak = $(container).parent().html().match(new RegExp("\<span id=[\'|\"]" + wym._current_unique_stamp + "[\'|\"]\>.*\<\/span\>([\\s\\S]*)"))[1].split('</p>')[0];
var rgx = $(container).parent().html().match(new RegExp("\<span id=[\'|\"]" + wym._current_unique_stamp + "[\'|\"]\>.*\<\/span\>([\\s\\S]*)"));
if(rgx && rgx[1]){
contentAfterBreak = rgx[1].split('</p>')[0];
}
sTmp = "<p id='last_paste'>" + sTmp + "</p>";
} else {
sTmp = "<p>" + sTmp + "</p>";
Expand Down

0 comments on commit e251402

Please sign in to comment.