Skip to content

Commit

Permalink
fix: Only trigger image input rule at the start or with a preceding s…
Browse files Browse the repository at this point in the history
…pace
  • Loading branch information
rfgamaral committed May 26, 2022
1 parent 47f2444 commit 66019df
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/extension-image/src/image.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down

0 comments on commit 66019df

Please sign in to comment.