Update extension.py

This commit is contained in:
Benedikt Willi 2022-08-08 13:18:50 +02:00 committed by GitHub
parent ffbac50ce0
commit a665517a5d
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()
link_pattern = OEmbedLinkPattern(OEMBED_LINK_RE, md,
self.oembed_consumer)
md.inlinePatterns.add('oembed_link', link_pattern, '<image_link')
md.inlinePatterns.register(link_pattern, 'oembed_link', 135)
def prepare_oembed_consumer(self):
allowed_endpoints = self.getConfig('allowed_endpoints', DEFAULT_ENDPOINTS)