Ticket #7065: 7065.patch
File 7065.patch, 974 bytes (added by , 12 years ago) |
---|
-
_source/plugins/styles/plugin.js
965 965 */ 966 966 function splitIntoPres( preBlock ) 967 967 { 968 // Exclude the ones at header OR at tail, 969 // and ignore bookmark content between them. 970 var duoBrRegex = /(\S\s*)\n(?:\s|(<span[^>]+data-cke-bookmark.*?\/span>))*\n(?!$)/gi, 968 // Two consequent line-breaks make a split, be ware of bookmarks. 969 var duoBrRegex = /(?:(\n|<br[^>]*?>)((:?<span[^>]+data-cke-bookmark.*?\/span>)*))\1/gi, 971 970 blockName = preBlock.getName(), 972 971 splitedHtml = replace( preBlock.getOuterHtml(), 973 972 duoBrRegex, 974 function( match, charBefore, bookmark )973 function( match, linebreak, bookmark ) 975 974 { 976 return charBefore + '</pre>' + bookmark + '<pre>';975 return bookmark + '</pre><pre>'; 977 976 } ); 978 977 979 978 var pres = [];