Skip to content

Commit

Permalink
Fixed deprecation warning in tags plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
squidfunk committed Apr 29, 2024
1 parent edcc536 commit cff4a75
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
6 changes: 5 additions & 1 deletion material/plugins/tags/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,11 @@ def _get_tags_file(self, files, path):
log.error(f"Tags file '{path}' does not exist.")
sys.exit(1)

# Add tags file to files
# Add tags file to files - note: since MkDoc 1.6, not removing the
# file before adding it to the end will trigger a deprecation warning
# The new tags plugin does not require this hack, so we're just going
# to live with it until the new tags plugin is released.
files.remove(file)
files.append(file)
return file

Expand Down
6 changes: 5 additions & 1 deletion src/plugins/tags/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,11 @@ def _get_tags_file(self, files, path):
log.error(f"Tags file '{path}' does not exist.")
sys.exit(1)

# Add tags file to files
# Add tags file to files - note: since MkDoc 1.6, not removing the
# file before adding it to the end will trigger a deprecation warning
# The new tags plugin does not require this hack, so we're just going
# to live with it until the new tags plugin is released.
files.remove(file)
files.append(file)
return file

Expand Down

0 comments on commit cff4a75

Please sign in to comment.