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

Made Autoloader and Diff Highlight compatible #2580

Merged

Conversation

RunDevelopment
Copy link
Member

This fixes #2577.

I fixed the issue by making two changes:

  1. Autoloader now understands the diff-xxxx format, and
  2. Diff Highlight (DH) now resolves Prism.languages.diff at "run time".

Up until now, DH used to read the PREFIXES property from Prism.languages.diff during the initialization of the plugin. This meant that the Diff language definition always had to be loaded before DH. This is no longer the case meaning that the Diff language definition can be loaded async (Autoloader) and DH will work. Without Diff loaded, DH will do (almost) nothing and log a one-time warning saying that it requires the Diff language definition (the warning will be suppressed if Autoloader is present).

I also made some other very minor changes to DH.

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.

diff + language does not work in combination with autoloader
1 participant