fix link pattern to also detect new (longer) top level domains

This commit is contained in:
Marius Tolzmann 2019-05-06 06:46:10 +02:00
parent 0e59e0cc0c
commit d8cc84bde9

View File

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