Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change extra_javascript items to usually be strings again #3324

Merged
merged 1 commit into from
Aug 2, 2023
Merged

Conversation

oprypin
Copy link
Contributor

@oprypin oprypin commented Aug 1, 2023

In 1.5.0 extra_javascript was changed to become a list[ExtraScriptValue], but strings could sneak in anyway, although MkDocs would never put them there anymore.

Let's change it to officially be list[ExtraScriptValue | str] but typically these items will be strings once again, unless specified as a dictionary in the config in the first place. This will guard plugins that aren't updated yet from a breakages unless users actually use mjs files.

In 1.5.0 `extra_javascript` was changed to become a `list[ExtraScriptValue]`, but strings could sneak in anyway, although MkDocs would never put them there anymore.

Let's change it to officially be `list[ExtraScriptValue | str]` but typically these items will be strings once again, unless specified as a dictionary in the config in the first place. This will guard plugins that aren't updated yet from a breakages unless users actually use `mjs` files.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Unhashable type: 'ExtraScriptValue' Error
1 participant