Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@ckeditor/ckeditor5-code-block

Package Overview
Dependencies
Maintainers
1
Versions
686
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ckeditor/ckeditor5-code-block - npm Package Compare versions

Comparing version 20.0.0 to 21.0.0

lang/translations/tk.po

28

package.json
{
"name": "@ckeditor/ckeditor5-code-block",
"version": "20.0.0",
"version": "21.0.0",
"description": "Code Block feature for CKEditor 5.",

@@ -13,18 +13,18 @@ "keywords": [

"dependencies": {
"@ckeditor/ckeditor5-core": "^20.0.0",
"@ckeditor/ckeditor5-enter": "^20.0.0",
"@ckeditor/ckeditor5-ui": "^20.0.0",
"@ckeditor/ckeditor5-utils": "^20.0.0",
"@ckeditor/ckeditor5-core": "^21.0.0",
"@ckeditor/ckeditor5-enter": "^21.0.0",
"@ckeditor/ckeditor5-ui": "^21.0.0",
"@ckeditor/ckeditor5-utils": "^21.0.0",
"lodash-es": "^4.17.15"
},
"devDependencies": {
"@ckeditor/ckeditor5-alignment": "^20.0.0",
"@ckeditor/ckeditor5-autoformat": "^20.0.0",
"@ckeditor/ckeditor5-basic-styles": "^20.0.0",
"@ckeditor/ckeditor5-block-quote": "^20.0.0",
"@ckeditor/ckeditor5-editor-classic": "^20.0.0",
"@ckeditor/ckeditor5-engine": "^20.0.0",
"@ckeditor/ckeditor5-indent": "^20.0.0",
"@ckeditor/ckeditor5-paragraph": "^20.0.0",
"@ckeditor/ckeditor5-undo": "^20.0.0"
"@ckeditor/ckeditor5-alignment": "^21.0.0",
"@ckeditor/ckeditor5-autoformat": "^21.0.0",
"@ckeditor/ckeditor5-basic-styles": "^21.0.0",
"@ckeditor/ckeditor5-block-quote": "^21.0.0",
"@ckeditor/ckeditor5-editor-classic": "^21.0.0",
"@ckeditor/ckeditor5-engine": "^21.0.0",
"@ckeditor/ckeditor5-indent": "^21.0.0",
"@ckeditor/ckeditor5-paragraph": "^21.0.0",
"@ckeditor/ckeditor5-undo": "^21.0.0"
},

@@ -31,0 +31,0 @@ "engines": {

@@ -75,3 +75,3 @@ /**

const firstBlock = first( selection.getSelectedBlocks() );
const isCodeBlock = !!( firstBlock && firstBlock.is( 'codeBlock' ) );
const isCodeBlock = !!( firstBlock && firstBlock.is( 'element', 'codeBlock' ) );

@@ -136,3 +136,3 @@ return isCodeBlock ? firstBlock.getAttribute( 'language' ) : false;

_removeCodeBlock( writer, blocks ) {
const codeBlocks = blocks.filter( block => block.is( 'codeBlock' ) );
const codeBlocks = blocks.filter( block => block.is( 'element', 'codeBlock' ) );

@@ -143,3 +143,3 @@ for ( const block of codeBlocks ) {

for ( const item of Array.from( range.getItems() ).reverse() ) {
if ( item.is( 'softBreak' ) && item.parent.is( 'codeBlock' ) ) {
if ( item.is( 'element', 'softBreak' ) && item.parent.is( 'element', 'codeBlock' ) ) {
const { position } = writer.split( writer.createPositionBefore( item ) );

@@ -146,0 +146,0 @@

@@ -139,3 +139,3 @@ /**

if ( !modelSelection.anchor.parent.is( 'codeBlock' ) ) {
if ( !modelSelection.anchor.parent.is( 'element', 'codeBlock' ) ) {
return;

@@ -160,3 +160,3 @@ }

if ( selection.isCollapsed || !anchor.parent.is( 'codeBlock' ) || !anchor.hasSameParentAs( selection.focus ) ) {
if ( selection.isCollapsed || !anchor.parent.is( 'element', 'codeBlock' ) || !anchor.hasSameParentAs( selection.focus ) ) {
return;

@@ -215,3 +215,3 @@ }

if ( !positionParent.is( 'codeBlock' ) ) {
if ( !positionParent.is( 'element', 'codeBlock' ) ) {
return;

@@ -254,3 +254,3 @@ }

// Figure out the indentation (white space chars) at the beginning of the line.
if ( node && node.is( 'text' ) ) {
if ( node && node.is( '$text' ) ) {
leadingWhiteSpaces = getLeadingWhiteSpaces( node );

@@ -294,3 +294,3 @@ }

if ( !nodeAfter || !nodeAfter.is( 'softBreak' ) ) {
if ( !nodeAfter || !nodeAfter.is( 'element', 'softBreak' ) ) {
return false;

@@ -358,3 +358,3 @@ }

//
if ( nodeBefore.is( 'softBreak' ) ) {
if ( nodeBefore.is( 'element', 'softBreak' ) ) {
emptyLineRangeToRemoveOnEnter = model.createRangeOn( nodeBefore );

@@ -376,6 +376,6 @@ }

else if (
nodeBefore.is( 'text' ) &&
nodeBefore.is( '$text' ) &&
!nodeBefore.data.match( /\S/ ) &&
nodeBefore.previousSibling &&
nodeBefore.previousSibling.is( 'softBreak' )
nodeBefore.previousSibling.is( 'element', 'softBreak' )
) {

@@ -382,0 +382,0 @@ emptyLineRangeToRemoveOnEnter = model.createRange(

@@ -150,3 +150,3 @@ /**

if ( !viewChild || !viewChild.is( 'code' ) ) {
if ( !viewChild || !viewChild.is( 'element', 'code' ) ) {
return;

@@ -153,0 +153,0 @@ }

@@ -176,3 +176,3 @@ /**

// <codeBlock>foo^<softBreak></softBreak>bar</codeBlock>
if ( !nodeAtPosition || nodeAtPosition.is( 'softBreak' ) ) {
if ( !nodeAtPosition || nodeAtPosition.is( 'element', 'softBreak' ) ) {
nodeAtPosition = position.nodeBefore;

@@ -183,3 +183,3 @@ }

// <codeBlock>foo^<softBreak></softBreak>bar</codeBlock>
if ( !nodeAtPosition || nodeAtPosition.is( 'softBreak' ) ) {
if ( !nodeAtPosition || nodeAtPosition.is( 'element', 'softBreak' ) ) {
return null;

@@ -186,0 +186,0 @@ }

@@ -192,3 +192,3 @@ /**

for ( const { item } of walker ) {
if ( item.is( 'textProxy' ) && item.parent.is( 'codeBlock' ) ) {
if ( item.is( '$textProxy' ) && item.parent.is( 'element', 'codeBlock' ) ) {
const leadingWhiteSpaces = getLeadingWhiteSpaces( item.textNode );

@@ -217,3 +217,3 @@ const { parent, startOffset } = item.textNode;

return firstBlock && firstBlock.is( 'codeBlock' );
return firstBlock && firstBlock.is( 'element', 'codeBlock' );
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc