Skip to content

Commit f19ed45

Browse files
committed
Added Sorting on Deserialize highlights
Serialize has highlights sorting but Deserialize, added it.
1 parent 23ca5e3 commit f19ed45

File tree

7 files changed

+8
-6
lines changed

7 files changed

+8
-6
lines changed

lib/rangy-classapplier.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
* Copyright 2016, Tim Down
1111
* Licensed under the MIT license.
1212
* Version: 1.3.1-dev
13-
* Build date: 15 January 2016
13+
* Build date: 2 February 2016
1414
*/
1515
(function(factory, root) {
1616
if (typeof define == "function" && define.amd) {

lib/rangy-core.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
* Copyright 2016, Tim Down
66
* Licensed under the MIT license.
77
* Version: 1.3.1-dev
8-
* Build date: 15 January 2016
8+
* Build date: 2 February 2016
99
*/
1010

1111
(function(factory, root) {

lib/rangy-highlighter.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* Copyright 2016, Tim Down
88
* Licensed under the MIT license.
99
* Version: 1.3.1-dev
10-
* Build date: 15 January 2016
10+
* Build date: 2 February 2016
1111
*/
1212
(function(factory, root) {
1313
if (typeof define == "function" && define.amd) {
@@ -612,6 +612,7 @@
612612
highlight.apply();
613613
highlights.push(highlight);
614614
}
615+
highlights.sort(compareHighlights);
615616
this.highlights = highlights;
616617
}
617618
};

lib/rangy-selectionsaverestore.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
* Copyright 2016, Tim Down
1111
* Licensed under the MIT license.
1212
* Version: 1.3.1-dev
13-
* Build date: 15 January 2016
13+
* Build date: 2 February 2016
1414
*/
1515
(function(factory, root) {
1616
if (typeof define == "function" && define.amd) {

lib/rangy-serializer.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
* Copyright 2016, Tim Down
1212
* Licensed under the MIT license.
1313
* Version: 1.3.1-dev
14-
* Build date: 15 January 2016
14+
* Build date: 2 February 2016
1515
*/
1616
(function(factory, root) {
1717
if (typeof define == "function" && define.amd) {

lib/rangy-textrange.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
* Copyright 2016, Tim Down
2828
* Licensed under the MIT license.
2929
* Version: 1.3.1-dev
30-
* Build date: 15 January 2016
30+
* Build date: 2 February 2016
3131
*/
3232

3333
/**

src/modules/rangy-highlighter.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -601,6 +601,7 @@ rangy.createModule("Highlighter", ["ClassApplier"], function(api, module) {
601601
highlight.apply();
602602
highlights.push(highlight);
603603
}
604+
highlights.sort(compareHighlights);
604605
this.highlights = highlights;
605606
}
606607
};

0 commit comments

Comments
 (0)