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

Tests: Additional checks for Prism functions #1803

Merged
merged 4 commits into from
Mar 24, 2019

Conversation

RunDevelopment
Copy link
Member

This adds some additional checks for the inputs of some Prism functions.
They work by replacing a function to test with another function calling both the test code and the original function.

This allows us to add complex checks without adding weight to Prism core.

Right now, I added checks for Prism.languages.extend and Prism.languages.insertBefore.


This resolves #1717.

@RunDevelopment
Copy link
Member Author

RunDevelopment commented Mar 24, 2019

This feels really hacky but it works and it even gets us IDE support; The new pseudo require.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

insertBefore should check that before exists
2 participants