mirror of
https://github.com/IT4Change/Ocelot-Social.git
synced 2025-12-13 07:45:56 +00:00
Update URL regex taking e.g. "?" into account
This commit is contained in:
parent
1aeb93f9fb
commit
8093fece00
@ -24,7 +24,8 @@ export default class Embed extends Node {
|
|||||||
pasteRules({ type, schema }) {
|
pasteRules({ type, schema }) {
|
||||||
return [
|
return [
|
||||||
pasteRule(
|
pasteRule(
|
||||||
/https?:\/\/(www\.)?[-a-zA-Z0-9@:%._+~#=]{2,256}\.[a-zA-Z]{2,}\b([-a-zA-Z0-9@:%_+.~#?&//=]*)/g,
|
// source: https://stackoverflow.com/a/3809435
|
||||||
|
/https?:\/\/(www\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b([-a-zA-Z0-9()@:%_+.~#?&//=]*)/g,
|
||||||
type,
|
type,
|
||||||
url => ({ dataEmbedUrl: url }),
|
url => ({ dataEmbedUrl: url }),
|
||||||
),
|
),
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user