@ckeditor/ckeditor5-code-block 43.3.1 → 44.0.0-alpha.1

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-code-block",
3
- "version": "43.3.1",
3
+ "version": "44.0.0-alpha.1",
4
4
  "description": "Code block feature for CKEditor 5.",
5
5
  "keywords": [
6
6
  "ckeditor",
@@ -13,13 +13,13 @@
13
13
  "type": "module",
14
14
  "main": "src/index.js",
15
15
  "dependencies": {
16
- "@ckeditor/ckeditor5-core": "43.3.1",
17
- "@ckeditor/ckeditor5-clipboard": "43.3.1",
18
- "@ckeditor/ckeditor5-engine": "43.3.1",
19
- "@ckeditor/ckeditor5-enter": "43.3.1",
20
- "@ckeditor/ckeditor5-ui": "43.3.1",
21
- "@ckeditor/ckeditor5-utils": "43.3.1",
22
- "ckeditor5": "43.3.1"
16
+ "@ckeditor/ckeditor5-core": "44.0.0-alpha.1",
17
+ "@ckeditor/ckeditor5-clipboard": "44.0.0-alpha.1",
18
+ "@ckeditor/ckeditor5-engine": "44.0.0-alpha.1",
19
+ "@ckeditor/ckeditor5-enter": "44.0.0-alpha.1",
20
+ "@ckeditor/ckeditor5-ui": "44.0.0-alpha.1",
21
+ "@ckeditor/ckeditor5-utils": "44.0.0-alpha.1",
22
+ "ckeditor5": "44.0.0-alpha.1"
23
23
  },
24
24
  "author": "CKSource (http://cksource.com/)",
25
25
  "license": "GPL-2.0-or-later",
package/src/converters.js CHANGED
@@ -164,6 +164,8 @@ export function dataViewToModelCodeBlockInsertion(editingView, languageDefs) {
164
164
  if (!codeBlock.hasAttribute('language')) {
165
165
  writer.setAttribute('language', defaultLanguageName, codeBlock);
166
166
  }
167
+ // Convert children before inserting the code block element
168
+ // to make sure that code block won't be splitted by any block.
167
169
  conversionApi.convertChildren(viewCodeElement, codeBlock);
168
170
  // Let's try to insert code block.
169
171
  if (!conversionApi.safeInsert(codeBlock, data.modelCursor)) {