X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=library%2Fmcefixes%2Fplugins.bbcode.editor_plugin_src.js;h=f94fbc5d719b4e936d0e54224a8f9cfacef7e8da;hb=e568020718c351bf64e8b2cb678427750b498ed6;hp=a2829a21c1cd12474a3bd9a4d433608746a702d4;hpb=1872cf2b2d14be5c4b8fbc9e2cf61f9fcd9e2f88;p=friendica.git diff --git a/library/mcefixes/plugins.bbcode.editor_plugin_src.js b/library/mcefixes/plugins.bbcode.editor_plugin_src.js index a2829a21c1..f94fbc5d71 100644 --- a/library/mcefixes/plugins.bbcode.editor_plugin_src.js +++ b/library/mcefixes/plugins.bbcode.editor_plugin_src.js @@ -46,10 +46,19 @@ function rep(re, str) { + +s = s.replace(re,str); + //modify code to keep stuff intact within [code][/code] blocks //Waitman Gobble NO WARRANTY +/* This doesn't seem to work well with +[code]line1 +line2[/code] +commenting out for now +*/ +/* var o = new Array(); var x = s.split("[code]"); var i = 0; @@ -71,7 +80,7 @@ } s = o.join("[code]"); - +*/ }; @@ -150,8 +159,8 @@ rep(/]*>/gi,"[quote]"); rep(/<\/blockquote>/gi,"[/quote]"); rep(/
/gi,"[hr]"); - rep(/
/gi,"\n\n"); - rep(//gi,"\n\n"); + rep(/
/gi,"\n"); + rep(//gi,"\n"); rep(/
/gi,"\n"); rep(/

/gi,""); rep(/<\/p>/gi,"\n"); @@ -171,6 +180,7 @@ function rep(re, str) { + //modify code to keep stuff intact within [code][/code] blocks //Waitman Gobble NO WARRANTY