add link pasterule support for exclamation marks

This commit is contained in:
Hans Pagel 2021-01-05 21:33:26 +01:00
parent 358d2228d9
commit a119709dbc

View File

@ -56,7 +56,7 @@ export default class Link extends Mark {
pasteRules({ type }) { pasteRules({ type }) {
return [ return [
pasteRule( pasteRule(
/https?:\/\/(www\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-zA-Z]{2,}\b([-a-zA-Z0-9@:%_+.~#?&//=,()]*)/gi, /https?:\/\/(www\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-zA-Z]{2,}\b([-a-zA-Z0-9@:%_+.~#?&//=,()!]*)/gi,
type, type,
url => ({ href: url }), url => ({ href: url }),
), ),