edit: no semantic newlines after semicolons
authorMischa POSLAWSKY <perl@shiar.org>
Mon, 9 Jul 2018 20:32:22 +0000 (22:32 +0200)
committerMischa POSLAWSKY <perl@shiar.org>
Mon, 9 Jul 2018 23:52:57 +0000 (01:52 +0200)
Not a good break point as it's mostly used in html entities such as &amp;.

edit.js

diff --git a/edit.js b/edit.js
index 1b71547f359950ab25950160e6de4195129ac495..a7d098c0b3c3b2dde86078f7033158fa5b10c3bb 100644 (file)
--- 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