add newline-after-var rule to eslint config

This commit is contained in:
Philipp Kühn
2021-12-03 00:03:39 +01:00
parent 6360278660
commit 40a9404c94
23 changed files with 40 additions and 2 deletions

View File

@@ -281,6 +281,7 @@ export class Editor extends EventEmitter<EditorEvents> {
// Lets store the editor instance in the DOM element.
// So well have access to it for tests.
const dom = this.view.dom as HTMLElement
dom.editor = this
}

View File

@@ -31,6 +31,7 @@ export const undoInputRule: RawCommands['undoInputRule'] = () => ({ state, dispa
if (undoable.text) {
const marks = tr.doc.resolve(undoable.from).marks()
tr.replaceWith(undoable.from, undoable.to, state.schema.text(undoable.text, marks))
} else {
tr.delete(undoable.from, undoable.to)

View File

@@ -7,6 +7,7 @@ export default function getHTMLFromFragment(fragment: Fragment, schema: Schema):
const temporaryDocument = document.implementation.createHTMLDocument()
const container = temporaryDocument.createElement('div')
container.appendChild(documentFragment)
return container.innerHTML

View File

@@ -37,6 +37,7 @@ export default function nodeInputRule(config: {
// insert last typed character
const lastChar = match[0][match[0].length - 1]
tr.insertText(lastChar, start + match[0].length - 1)
// insert node from input rule