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

When submitting a code snippet with a language that has already been used, the code snippet is not colored. #6

Closed
NullVoxPopuli opened this issue Oct 2, 2018 · 1 comment
Labels
Hacktoberfest Good for the month of october for hacktoberfest and new contibutors

Comments

@NullVoxPopuli
Copy link
Owner

NullVoxPopuli commented Oct 2, 2018

image

This is because when the second code snippet is parsed, it detects the ts, and ts has already been loaded, so... why load it again?

what needs to happen is Prism.highlightAll() or whatever the equivalent would be for a specific language. (if it's possible to just highlight for the most recently submitted code snippet, that should happen).

Prism documentation: https://prismjs.com/extending.html#api

It actually looks like Prism.highlightAllUnder(element, async, callback) should be used in message/component.ts in the didInsertElement hook

@NullVoxPopuli NullVoxPopuli added the Hacktoberfest Good for the month of october for hacktoberfest and new contibutors label Oct 2, 2018
@NullVoxPopuli
Copy link
Owner Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Hacktoberfest Good for the month of october for hacktoberfest and new contibutors
Projects
None yet
Development

No branches or pull requests

1 participant