From: Mischa POSLAWSKY Date: Mon, 9 Jul 2018 20:32:22 +0000 (+0200) Subject: edit: no semantic newlines after semicolons X-Git-Tag: v3.5~13 X-Git-Url: http://git.shiar.net/minimedit.git/commitdiff_plain/8f3fff9a34c185ea8f6a84eab790385b666f81c7 edit: no semantic newlines after semicolons Not a good break point as it's mostly used in html entities such as &. --- diff --git a/edit.js b/edit.js index 1b71547..a7d098c 100644 --- a/edit.js +++ b/edit.js @@ -9,7 +9,7 @@ CKEDITOR.plugins.add('inlinesave', { // wrap long line after each sentence body = body.replace(/^(\t*).{73,}/mg, function (line, indent) { var dots = '(?:.{24,72}|.{73,}?)'; // chars before punctuation - var wrap = new RegExp('('+dots+'[.;:!?]) (?=[A-Z(<])', 'g'); // separate lines + var wrap = new RegExp('('+dots+'[.:!?]) (?=[A-Z(<])', 'g'); // separate lines return line.replace(wrap, '$1\n'+indent+'\t'); }); // treat standalone placeholders as block elements