Fixed deprecation warnings

This commit is contained in:
Benedikt Willi 2022-01-17 16:02:18 +01:00 committed by GitHub
parent 5d6b341f8a
commit 5469df52a8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -17,11 +17,12 @@ class OEmbedExtension(Extension):
}
super(OEmbedExtension, self).__init__(**kwargs)
def extendMarkdown(self, md, md_globals):
def extendMarkdown(self, md):
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', 75)
def prepare_oembed_consumer(self):
allowed_endpoints = self.getConfig('allowed_endpoints', DEFAULT_ENDPOINTS)