Merge pull request #3440 from CatoTH/20171011-Diff-Improvements
Diff: use comma as a word separator
This commit is contained in:
commit
4e672c5832
@ -37,7 +37,7 @@ Motions:
|
|||||||
- Added config value for pagenumber alignment in PDF [#3327].
|
- Added config value for pagenumber alignment in PDF [#3327].
|
||||||
- Bugfix: Several bugfixes regarding splitting list items in
|
- Bugfix: Several bugfixes regarding splitting list items in
|
||||||
change recommendations [#3288].
|
change recommendations [#3288].
|
||||||
- Bugfix: Several bugfixes regarding diff version [#3407, #3408, #3410].
|
- Bugfix: Several bugfixes regarding diff version [#3407, #3408, #3410, #3440].
|
||||||
- Added inline Editing for motion reason [#3361].
|
- Added inline Editing for motion reason [#3361].
|
||||||
- Added multiselect filter for motion comments [#3372].
|
- Added multiselect filter for motion comments [#3372].
|
||||||
- Added support for pinning personal notes to the window [#3360].
|
- Added support for pinning personal notes to the window [#3360].
|
||||||
|
@ -931,6 +931,7 @@ angular.module('OpenSlidesApp.motions.diff', ['OpenSlidesApp.motions.lineNumberi
|
|||||||
arr = splitArrayEntriesEmbedSeparator(arr, '>', false);
|
arr = splitArrayEntriesEmbedSeparator(arr, '>', false);
|
||||||
arr = splitArrayEntriesSplitSeparator(arr, " ");
|
arr = splitArrayEntriesSplitSeparator(arr, " ");
|
||||||
arr = splitArrayEntriesSplitSeparator(arr, ".");
|
arr = splitArrayEntriesSplitSeparator(arr, ".");
|
||||||
|
arr = splitArrayEntriesSplitSeparator(arr, ",");
|
||||||
arr = splitArrayEntriesEmbedSeparator(arr, "\n", false);
|
arr = splitArrayEntriesEmbedSeparator(arr, "\n", false);
|
||||||
|
|
||||||
var arrWithoutEmptes = [];
|
var arrWithoutEmptes = [];
|
||||||
|
@ -471,6 +471,14 @@ describe('linenumbering', function () {
|
|||||||
expect(diff).toBe('Test Test<ins>append</ins>');
|
expect(diff).toBe('Test Test<ins>append</ins>');
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it('recognizes commas as a word separator', function () {
|
||||||
|
var before = "Lorem ipsum dolor sit amet, consetetur sadipscing elitr sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat",
|
||||||
|
after = "Lorem ipsum dolor sit amet, consetetur sadipscing elitr, diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat";
|
||||||
|
var diff = diffService.diff(before, after);
|
||||||
|
|
||||||
|
expect(diff).toBe('Lorem ipsum dolor sit amet, consetetur sadipscing elitr<del> sed</del><ins>,</ins> diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat');
|
||||||
|
});
|
||||||
|
|
||||||
it('cannot handle changing CSS-classes', function () {
|
it('cannot handle changing CSS-classes', function () {
|
||||||
var before = "<p class='p1'>Test1 Test2</p>",
|
var before = "<p class='p1'>Test1 Test2</p>",
|
||||||
after = "<p class='p2'>Test1 Test2</p>";
|
after = "<p class='p2'>Test1 Test2</p>";
|
||||||
|
Loading…
Reference in New Issue
Block a user