diff --git a/openslides/motions/static/js/motions/diff.js b/openslides/motions/static/js/motions/diff.js index 51316ad41..99f34540c 100644 --- a/openslides/motions/static/js/motions/diff.js +++ b/openslides/motions/static/js/motions/diff.js @@ -937,6 +937,7 @@ angular.module('OpenSlidesApp.motions.diff', ['OpenSlidesApp.motions.lineNumberi arr = splitArrayEntriesSplitSeparator(arr, "."); arr = splitArrayEntriesSplitSeparator(arr, ","); arr = splitArrayEntriesSplitSeparator(arr, "!"); + arr = splitArrayEntriesSplitSeparator(arr, "-"); arr = splitArrayEntriesEmbedSeparator(arr, "\n", false); var arrWithoutEmptes = []; diff --git a/tests/karma/motions/diff.service.test.js b/tests/karma/motions/diff.service.test.js index fd46b39bd..919a8209a 100644 --- a/tests/karma/motions/diff.service.test.js +++ b/tests/karma/motions/diff.service.test.js @@ -651,6 +651,15 @@ describe('linenumbering', function () { "

Ya

\n\n" + "

Die Geißlein sagten: \" Liebe Mutter, wir wollen uns schon in acht nehmen, du kannst ohne

"); }); + + it('line breaks at dashes does not delete/insert the last/first word of the split lines', function () { + var before = "", + after = ""; + + before = lineNumberingService.insertLineNumbers(before, 90); + var diff = diffService.diff(before, after); + expect(diff).toBe(""); + }); }); describe('addCSSClassToFirstTag function', function () {