mirror of
https://github.com/squidfunk/mkdocs-material.git
synced 2024-06-14 11:52:32 +03:00
Fixed deprecation warning in privacy plugin
This commit is contained in:
parent
cff4a75d15
commit
ff49d74024
@ -363,8 +363,10 @@ class PrivacyPlugin(BasePlugin[PrivacyConfig]):
|
|||||||
else:
|
else:
|
||||||
self._fetch(file, config)
|
self._fetch(file, config)
|
||||||
|
|
||||||
# Register external asset as file
|
# Register external asset as file - it might have already been
|
||||||
self.assets.append(file)
|
# registered, and since MkDocs 1.6, trigger a deprecation warning
|
||||||
|
if not self.assets.get_file_from_path(file.src_uri):
|
||||||
|
self.assets.append(file)
|
||||||
|
|
||||||
# If the URL of the external asset includes a hash fragment, add it to
|
# If the URL of the external asset includes a hash fragment, add it to
|
||||||
# the returned file, e.g. for dark/light images - see https://t.ly/7b16Y
|
# the returned file, e.g. for dark/light images - see https://t.ly/7b16Y
|
||||||
|
@ -363,8 +363,10 @@ class PrivacyPlugin(BasePlugin[PrivacyConfig]):
|
|||||||
else:
|
else:
|
||||||
self._fetch(file, config)
|
self._fetch(file, config)
|
||||||
|
|
||||||
# Register external asset as file
|
# Register external asset as file - it might have already been
|
||||||
self.assets.append(file)
|
# registered, and since MkDocs 1.6, trigger a deprecation warning
|
||||||
|
if not self.assets.get_file_from_path(file.src_uri):
|
||||||
|
self.assets.append(file)
|
||||||
|
|
||||||
# If the URL of the external asset includes a hash fragment, add it to
|
# If the URL of the external asset includes a hash fragment, add it to
|
||||||
# the returned file, e.g. for dark/light images - see https://t.ly/7b16Y
|
# the returned file, e.g. for dark/light images - see https://t.ly/7b16Y
|
||||||
|
Loading…
Reference in New Issue
Block a user