mirror of
https://github.com/ueberdosis/tiptap.git
synced 2024-11-27 14:59:27 +08:00
refactor: update tests url checking logic and comments
This commit is contained in:
parent
6bdb5917a5
commit
035862b698
@ -136,7 +136,7 @@ context('/src/Marks/Link/React/', () => {
|
||||
disallowedProtocols.forEach(url => {
|
||||
cy.get('.tiptap').then(([{ editor }]) => {
|
||||
editor.commands.setContent(`<p><a href="${url}">Example Text</a></p>`)
|
||||
expect(editor.getHTML()).to.not.include(`<a href="${url}">`)
|
||||
expect(editor.getHTML()).to.not.include(url)
|
||||
})
|
||||
})
|
||||
})
|
||||
@ -147,7 +147,7 @@ context('/src/Marks/Link/React/', () => {
|
||||
disallowedDomains.forEach(url => {
|
||||
cy.get('.tiptap').then(([{ editor }]) => {
|
||||
editor.commands.setContent(`<p><a href="${url}">Example Text</a></p>`)
|
||||
expect(editor.getHTML()).to.not.include(`<a href="${url}">`)
|
||||
expect(editor.getHTML()).to.not.include(url)
|
||||
})
|
||||
})
|
||||
})
|
||||
|
@ -73,7 +73,7 @@ export interface LinkOptions {
|
||||
HTMLAttributes: Record<string, any>
|
||||
|
||||
/**
|
||||
* A validation function that modifies link verification for the auto linker.
|
||||
* A validation function that modifies link verification.
|
||||
* @param url - The url to be validated.
|
||||
* @param ctx - An object containing:
|
||||
* - `defaultValidate`: A function that performs the default URL validation.
|
||||
|
Loading…
Reference in New Issue
Block a user