From 275d07659d1a2b2bb91ff08a9a43200453e57736 Mon Sep 17 00:00:00 2001 From: Elian Doran Date: Sat, 12 Jul 2025 19:20:54 +0300 Subject: [PATCH] chore(ckeditor5-footnotes): fix references: Range -> ModelRange --- .../src/footnote-editing/auto-formatting.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/ckeditor5-footnotes/src/footnote-editing/auto-formatting.ts b/packages/ckeditor5-footnotes/src/footnote-editing/auto-formatting.ts index a4ecee2db..54d97cf10 100644 --- a/packages/ckeditor5-footnotes/src/footnote-editing/auto-formatting.ts +++ b/packages/ckeditor5-footnotes/src/footnote-editing/auto-formatting.ts @@ -1,4 +1,4 @@ -import { type Editor, ModelText, ModelTextProxy, type ModelElement, type Range, type Autoformat, inlineAutoformatEditing } from 'ckeditor5'; +import { type Editor, ModelText, ModelTextProxy, type ModelElement, type ModelRange, type Autoformat, inlineAutoformatEditing } from 'ckeditor5'; import { COMMANDS, ELEMENTS } from '../constants.js'; import { modelQueryElement, modelQueryElementsAll } from '../utils.js'; @@ -68,7 +68,7 @@ const regexMatchCallback = ( * Footnotes only get inserted if the matching range is an integer between 1 * and the number of existing footnotes + 1. */ -const formatCallback = ( ranges: Array, editor: Editor, rootElement: ModelElement ): boolean | undefined => { +const formatCallback = ( ranges: Array, editor: Editor, rootElement: ModelElement ): boolean | undefined => { const command = editor.commands.get( COMMANDS.insertFootnote ); if ( !command || !command.isEnabled ) { return; @@ -115,7 +115,7 @@ export const addFootnoteAutoformatting = ( editor: Editor, rootElement: ModelEle editor, autoformatPluginInstance, text => regexMatchCallback( editor, text ), - ( _, ranges: Array ) => formatCallback( ranges, editor, rootElement ) + ( _, ranges: Array ) => formatCallback( ranges, editor, rootElement ) ); } };