mirror of
https://github.com/ueberdosis/tiptap.git
synced 2025-01-18 06:03:22 +08:00
fix type for getAttributes
This commit is contained in:
parent
c315935bf9
commit
4636b1a1a5
@ -35,6 +35,7 @@ module.exports = {
|
||||
'airbnb-base',
|
||||
],
|
||||
rules: {
|
||||
'no-continue': 'off',
|
||||
'no-alert': 'off',
|
||||
'no-console': ['warn', { allow: ['warn', 'error'] }],
|
||||
semi: ['error', 'never'],
|
||||
|
@ -4,7 +4,12 @@ import { Slice, Fragment, MarkType } from 'prosemirror-model'
|
||||
export default function (
|
||||
regexp: RegExp,
|
||||
type: MarkType,
|
||||
getAttributes?: Record<string, any> | ((match: RegExpExecArray) => Record<string, any>),
|
||||
getAttributes?:
|
||||
| Record<string, any>
|
||||
| ((match: RegExpExecArray) => Record<string, any>)
|
||||
| false
|
||||
| null
|
||||
,
|
||||
): Plugin {
|
||||
const handler = (fragment: Fragment, parent?: any) => {
|
||||
const nodes: any[] = []
|
||||
@ -31,7 +36,7 @@ export default function (
|
||||
: getAttributes
|
||||
|
||||
if (!attrs) {
|
||||
continue;
|
||||
continue
|
||||
}
|
||||
|
||||
// adding text before markdown to nodes
|
||||
|
Loading…
Reference in New Issue
Block a user