fix: Only trigger image input rule at the start or with a preceding space
This commit is contained in:
@@ -21,7 +21,7 @@ declare module '@tiptap/core' {
|
||||
}
|
||||
}
|
||||
|
||||
export const inputRegex = /(!\[(.+|:?)]\((\S+)(?:(?:\s+)["'](\S+)["'])?\))$/
|
||||
export const inputRegex = /(?:^|\s)(!\[(.+|:?)]\((\S+)(?:(?:\s+)["'](\S+)["'])?\))$/
|
||||
|
||||
export const Image = Node.create<ImageOptions>({
|
||||
name: 'image',
|
||||
|
||||
Reference in New Issue
Block a user