@ckeditor/ckeditor5-autoformat
Advanced tools
Comparing version 10.0.3 to 10.0.4
Changelog | ||
========= | ||
## [10.0.4](https://github.com/ckeditor/ckeditor5-autoformat/compare/v10.0.3...v10.0.4) (2018-12-05) | ||
Internal changes only (updated dependencies, documentation, etc.). | ||
## [10.0.3](https://github.com/ckeditor/ckeditor5-autoformat/compare/v10.0.2...v10.0.3) (2018-10-08) | ||
@@ -5,0 +10,0 @@ |
{ | ||
"name": "@ckeditor/ckeditor5-autoformat", | ||
"version": "10.0.3", | ||
"version": "10.0.4", | ||
"description": "Autoformatting feature for CKEditor 5.", | ||
@@ -13,16 +13,16 @@ "keywords": [ | ||
"dependencies": { | ||
"@ckeditor/ckeditor5-core": "^11.0.1", | ||
"@ckeditor/ckeditor5-engine": "^11.0.0" | ||
"@ckeditor/ckeditor5-core": "^11.1.0" | ||
}, | ||
"devDependencies": { | ||
"@ckeditor/ckeditor5-basic-styles": "^10.0.3", | ||
"@ckeditor/ckeditor5-block-quote": "^10.1.0", | ||
"@ckeditor/ckeditor5-cloud-services": "^10.1.0", | ||
"@ckeditor/ckeditor5-editor-classic": "^11.0.1", | ||
"@ckeditor/ckeditor5-enter": "^10.1.2", | ||
"@ckeditor/ckeditor5-heading": "^10.1.0", | ||
"@ckeditor/ckeditor5-list": "^11.0.2", | ||
"@ckeditor/ckeditor5-paragraph": "^10.0.3", | ||
"@ckeditor/ckeditor5-typing": "^11.0.1", | ||
"@ckeditor/ckeditor5-undo": "^10.0.3", | ||
"@ckeditor/ckeditor5-basic-styles": "^10.1.0", | ||
"@ckeditor/ckeditor5-block-quote": "^10.1.1", | ||
"@ckeditor/ckeditor5-cloud-services": "^10.1.1", | ||
"@ckeditor/ckeditor5-editor-classic": "^11.0.2", | ||
"@ckeditor/ckeditor5-engine": "^12.0.0", | ||
"@ckeditor/ckeditor5-enter": "^10.1.3", | ||
"@ckeditor/ckeditor5-heading": "^10.1.1", | ||
"@ckeditor/ckeditor5-list": "^11.0.3", | ||
"@ckeditor/ckeditor5-paragraph": "^10.0.4", | ||
"@ckeditor/ckeditor5-typing": "^11.0.2", | ||
"@ckeditor/ckeditor5-undo": "^10.0.4", | ||
"eslint": "^5.5.0", | ||
@@ -29,0 +29,0 @@ "eslint-config-ckeditor5": "^1.0.7", |
@@ -10,4 +10,2 @@ /** | ||
import Range from '@ckeditor/ckeditor5-engine/src/model/range'; | ||
/** | ||
@@ -94,3 +92,5 @@ * The block autoformatting engine. It allows to format various block patterns. For example, | ||
// Matched range. | ||
const range = Range.createFromParentsAndOffsets( item.parent, 0, item.parent, match[ 0 ].length ); | ||
const start = writer.createPositionAt( item.parent, 0 ); | ||
const end = writer.createPositionAt( item.parent, match[ 0 ].length ); | ||
const range = writer.createRange( start, end ); | ||
@@ -97,0 +97,0 @@ // Remove matched text. |
@@ -10,4 +10,2 @@ /** | ||
import ModelRange from '@ckeditor/ckeditor5-engine/src/model/range'; | ||
/** | ||
@@ -167,4 +165,4 @@ * The inline autoformatting engine. It allows to format various inline patterns. For example, | ||
const testOutput = testCallback( text ); | ||
const rangesToFormat = testOutputToRanges( block, testOutput.format ); | ||
const rangesToRemove = testOutputToRanges( block, testOutput.remove ); | ||
const rangesToFormat = testOutputToRanges( block, testOutput.format, editor.model ); | ||
const rangesToRemove = testOutputToRanges( block, testOutput.remove, editor.model ); | ||
@@ -206,6 +204,9 @@ if ( !( rangesToFormat.length && rangesToRemove.length ) ) { | ||
// @param {Array.<Array>} arrays | ||
function testOutputToRanges( block, arrays ) { | ||
// @param {module:engine/model/model~Model} model | ||
function testOutputToRanges( block, arrays, model ) { | ||
return arrays | ||
.filter( array => ( array[ 0 ] !== undefined && array[ 1 ] !== undefined ) ) | ||
.map( array => ModelRange.createFromParentsAndOffsets( block, array[ 0 ], block, array[ 1 ] ) ); | ||
.map( array => { | ||
return model.createRange( model.createPositionAt( block, array[ 0 ] ), model.createPositionAt( block, array[ 1 ] ) ); | ||
} ); | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
25859
1
402
15
- Removed@ckeditor/ckeditor5-engine@^11.0.0
- Removed@ckeditor/ckeditor5-engine@11.0.0(transitive)