@ckeditor/ckeditor5-list 46.0.0-alpha.5 → 46.0.0-alpha.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ckeditor/ckeditor5-list",
3
- "version": "46.0.0-alpha.5",
3
+ "version": "46.0.0-alpha.7",
4
4
  "description": "Ordered and unordered lists feature to CKEditor 5.",
5
5
  "keywords": [
6
6
  "ckeditor",
@@ -13,16 +13,16 @@
13
13
  "type": "module",
14
14
  "main": "src/index.js",
15
15
  "dependencies": {
16
- "@ckeditor/ckeditor5-clipboard": "46.0.0-alpha.5",
17
- "@ckeditor/ckeditor5-core": "46.0.0-alpha.5",
18
- "@ckeditor/ckeditor5-engine": "46.0.0-alpha.5",
19
- "@ckeditor/ckeditor5-enter": "46.0.0-alpha.5",
20
- "@ckeditor/ckeditor5-font": "46.0.0-alpha.5",
21
- "@ckeditor/ckeditor5-icons": "46.0.0-alpha.5",
22
- "@ckeditor/ckeditor5-typing": "46.0.0-alpha.5",
23
- "@ckeditor/ckeditor5-ui": "46.0.0-alpha.5",
24
- "@ckeditor/ckeditor5-utils": "46.0.0-alpha.5",
25
- "ckeditor5": "46.0.0-alpha.5"
16
+ "@ckeditor/ckeditor5-clipboard": "46.0.0-alpha.7",
17
+ "@ckeditor/ckeditor5-core": "46.0.0-alpha.7",
18
+ "@ckeditor/ckeditor5-engine": "46.0.0-alpha.7",
19
+ "@ckeditor/ckeditor5-enter": "46.0.0-alpha.7",
20
+ "@ckeditor/ckeditor5-font": "46.0.0-alpha.7",
21
+ "@ckeditor/ckeditor5-icons": "46.0.0-alpha.7",
22
+ "@ckeditor/ckeditor5-typing": "46.0.0-alpha.7",
23
+ "@ckeditor/ckeditor5-ui": "46.0.0-alpha.7",
24
+ "@ckeditor/ckeditor5-utils": "46.0.0-alpha.7",
25
+ "ckeditor5": "46.0.0-alpha.7"
26
26
  },
27
27
  "author": "CKSource (http://cksource.com/)",
28
28
  "license": "SEE LICENSE IN LICENSE.md",
@@ -85,7 +85,8 @@ export class ListFormatting extends Plugin {
85
85
  if (entry.type === 'attribute') {
86
86
  if (entry.attributeKey == 'listItemId' ||
87
87
  entry.attributeKey == 'listType' ||
88
- this._isInlineOrSelectionFormatting(entry.attributeKey)) {
88
+ this._isInlineOrSelectionFormatting(entry.attributeKey) ||
89
+ Object.values(this._loadedFormatting).includes(entry.attributeKey)) {
89
90
  if (isListItemBlock(entry.range.start.nodeAfter)) {
90
91
  modifiedListItems.add(entry.range.start.nodeAfter);
91
92
  }
@@ -193,6 +194,10 @@ function getSingleListItemConsistentFormat(model, listItem, attributeKeys) {
193
194
  valuesMap[attributeKey] = undefined;
194
195
  }
195
196
  }
197
+ else if (!(attributeKey in valuesMap)) {
198
+ // Store it so a format would be removed when all items in the given list item does not allow that formatting.
199
+ valuesMap[attributeKey] = undefined;
200
+ }
196
201
  }
197
202
  // End early if all attributes have been checked and are inconsistent.
198
203
  if (!attributesToCheck.size) {