From 8f3fff9a34c185ea8f6a84eab790385b666f81c7 Mon Sep 17 00:00:00 2001 From: Mischa POSLAWSKY Date: Mon, 9 Jul 2018 22:32:22 +0200 Subject: [PATCH] edit: no semantic newlines after semicolons Not a good break point as it's mostly used in html entities such as &. --- edit.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- 2.30.0