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

@tiptap/extension-code-block

Package Overview
Dependencies
Maintainers
2
Versions
182
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@tiptap/extension-code-block - npm Package Compare versions

Comparing version 2.0.0-beta.5 to 2.0.0-beta.6

11

CHANGELOG.md

@@ -6,2 +6,13 @@ # Change Log

# [2.0.0-beta.6](https://github.com/ueberdosis/tiptap-next/compare/@tiptap/extension-code-block@2.0.0-beta.5...@tiptap/extension-code-block@2.0.0-beta.6) (2021-04-21)
### Bug Fixes
* don’t use state in KeyboardShortcutCommand anymore ([92ced9f](https://github.com/ueberdosis/tiptap-next/commit/92ced9f9987d59ac672da65b2a685d296307c6b0))
# [2.0.0-beta.5](https://github.com/ueberdosis/tiptap-next/compare/@tiptap/extension-code-block@2.0.0-beta.4...@tiptap/extension-code-block@2.0.0-beta.5) (2021-04-16)

@@ -8,0 +19,0 @@

4

dist/packages/extension-code-block/src/code-block.d.ts
import { Command, Node } from '@tiptap/core';
export interface CodeBlockOptions {
languageClassPrefix: string;
HTMLAttributes: {
[key: string]: any;
};
HTMLAttributes: Record<string, any>;
}

@@ -8,0 +6,0 @@ declare module '@tiptap/core' {

@@ -72,6 +72,6 @@ 'use strict';

// remove code block when at start of document or code block is empty
Backspace: state => {
const { empty, $anchor } = state.selection;
Backspace: () => {
const { empty, $anchor } = this.editor.state.selection;
const isAtStart = $anchor.pos === 1;
if (!empty || $anchor.parent.type.name !== 'codeBlock') {
if (!empty || $anchor.parent.type.name !== this.name) {
return false;

@@ -78,0 +78,0 @@ }

@@ -68,6 +68,6 @@ import { Node } from '@tiptap/core';

// remove code block when at start of document or code block is empty
Backspace: state => {
const { empty, $anchor } = state.selection;
Backspace: () => {
const { empty, $anchor } = this.editor.state.selection;
const isAtStart = $anchor.pos === 1;
if (!empty || $anchor.parent.type.name !== 'codeBlock') {
if (!empty || $anchor.parent.type.name !== this.name) {
return false;

@@ -74,0 +74,0 @@ }

@@ -71,6 +71,6 @@ (function (global, factory) {

// remove code block when at start of document or code block is empty
Backspace: state => {
const { empty, $anchor } = state.selection;
Backspace: () => {
const { empty, $anchor } = this.editor.state.selection;
const isAtStart = $anchor.pos === 1;
if (!empty || $anchor.parent.type.name !== 'codeBlock') {
if (!empty || $anchor.parent.type.name !== this.name) {
return false;

@@ -77,0 +77,0 @@ }

{
"name": "@tiptap/extension-code-block",
"description": "code block extension for tiptap",
"version": "2.0.0-beta.5",
"version": "2.0.0-beta.6",
"homepage": "https://tiptap.dev",

@@ -30,3 +30,3 @@ "keywords": [

},
"gitHead": "ea9f5410915f45f7ba12d5c816965976f1956862"
"gitHead": "8fd618a788f288a9005e8e049d2f8f8df5523b6d"
}

@@ -6,5 +6,3 @@ import { Command, Node } from '@tiptap/core'

languageClassPrefix: string,
HTMLAttributes: {
[key: string]: any
},
HTMLAttributes: Record<string, any>,
}

@@ -107,7 +105,7 @@

// remove code block when at start of document or code block is empty
Backspace: state => {
const { empty, $anchor } = state.selection
Backspace: () => {
const { empty, $anchor } = this.editor.state.selection
const isAtStart = $anchor.pos === 1
if (!empty || $anchor.parent.type.name !== 'codeBlock') {
if (!empty || $anchor.parent.type.name !== this.name) {
return false

@@ -114,0 +112,0 @@ }

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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