fix more linting errors

This commit is contained in:
Philipp Kühn
2020-09-24 00:29:05 +02:00
parent aefb4ca8e6
commit ac33eb483e
106 changed files with 310 additions and 274 deletions

View File

@@ -1,5 +1,5 @@
import { Command } from '../Editor'
import { MarkType } from 'prosemirror-model'
import { Command } from '../Editor'
import getMarkType from '../utils/getMarkType'
import getMarkRange from '../utils/getMarkRange'
@@ -11,10 +11,12 @@ declare module '../Editor' {
}
}
export const removeMark: RemoveMarkCommand = (typeOrName) => ({ tr, state }) => {
export const removeMark: RemoveMarkCommand = typeOrName => ({ tr, state }) => {
const { selection } = tr
const type = getMarkType(typeOrName, state.schema)
let { from, to, $from, empty } = selection
let {
from, to, $from, empty,
} = selection
if (empty) {
const range = getMarkRange($from, type)