Skip to content

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

Merged
kitten merged 1 commit into
FormidableLabs:masterfrom
manuelpuyol:call-prism-hooks
Feb 17, 2021
Merged

Call prism before-tokenize and after-tokenize hooks#105
kitten merged 1 commit into
FormidableLabs:masterfrom
manuelpuyol:call-prism-hooks

Conversation

@manuelpuyol

@manuelpuyol manuelpuyol commented Feb 12, 2021

Copy link
Copy Markdown
Contributor

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

kitten commented Feb 13, 2021

Copy link
Copy Markdown
Contributor

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
Copy Markdown
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
Copy Markdown
Contributor Author

#106 PR for prettier format!

@kitten

kitten commented Feb 16, 2021

Copy link
Copy Markdown
Contributor

Alright, a rebase may sort this then 👍

@manuelpuyol

Copy link
Copy Markdown
Contributor Author

One more formatting issue before fixing changes here #107 😄

@manuelpuyol

Copy link
Copy Markdown
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