Update extension.py

This commit is contained in:
Benedikt Willi 2022-08-16 08:19:59 +02:00 committed by GitHub
parent 0e3bf49c86
commit 745056d5e6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -21,7 +21,7 @@ class OEmbedExtension(Extension):
self.oembed_consumer = self.prepare_oembed_consumer() self.oembed_consumer = self.prepare_oembed_consumer()
link_pattern = OEmbedLinkPattern(OEMBED_LINK_RE, md, link_pattern = OEmbedLinkPattern(OEMBED_LINK_RE, md,
self.oembed_consumer) self.oembed_consumer)
md.inlinePatterns.register(link_pattern, 'oembed_link', 135) md.inlinePatterns.register(link_pattern, 'oembed_link', 175)
def prepare_oembed_consumer(self): def prepare_oembed_consumer(self):
allowed_endpoints = self.getConfig('allowed_endpoints', DEFAULT_ENDPOINTS) allowed_endpoints = self.getConfig('allowed_endpoints', DEFAULT_ENDPOINTS)