When submitting a code snippet with a language that has already been used, the code snippet is not colored. #6
Labels
Hacktoberfest
Good for the month of october for hacktoberfest and new contibutors
This is because when the second code snippet is parsed, it detects the
ts
, andts
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 inmessage/component.ts
in thedidInsertElement
hookThe text was updated successfully, but these errors were encountered: