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

Call prism before-tokenize and after-tokenize hooks #105

Merged
merged 1 commit into from
Feb 17, 2021

Conversation

manuelpuyol
Copy link
Contributor

@manuelpuyol manuelpuyol commented Feb 12, 2021

Closes #104
Based on https://github.com/PrismJS/prism/blob/022f90a0bf8ac7e40373d1b783354715b0a1020f/prism.js#L606-L616

With this change, users with custom languages can also provide a custom version of Prism to make languages such as ERB to work with <Highlight>

@kitten
Copy link
Contributor

kitten commented Feb 13, 2021

Before reviewing this with white space changes ignored (alas, I don't think we added an editorconfig file to this repo) I'll see if I can carve out some time to see which change is interfering here, but it'd be great to get the commits amended to not change the white space formatting here 😅 it's fine for a separate commit if we do need to normalise them but as a whole it'd be a bit of a problem if a commit for a PR gives us confusing diff's outside of or inside of GitHub in the future 💙

@manuelpuyol
Copy link
Contributor Author

Hi @kitten thanks for the feedback!
Those white space changes are caused by the pre-commit hook, prettier updates the line ending my files.
Maybe we could run yarn format in the master branch and commit the result? It looks like some files need formatting:

image

@manuelpuyol
Copy link
Contributor Author

#106 PR for prettier format!

@kitten
Copy link
Contributor

kitten commented Feb 16, 2021

Alright, a rebase may sort this then 👍

@manuelpuyol
Copy link
Contributor Author

One more formatting issue before fixing changes here #107 😄

@manuelpuyol
Copy link
Contributor Author

@kitten diff is now clean!

@kitten kitten merged commit 169f789 into FormidableLabs:master Feb 17, 2021
@manuelpuyol manuelpuyol deleted the call-prism-hooks branch February 17, 2021 21:36
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.

Highlight component does not call before-tokenize and after-tokenize hooks
2 participants