Long string is not highlighted (JS)
ihor-zinchenko opened this issue · comments
Ihor commented
Reproduction
Use StackBlitz to reproduce your issue: https://stackblitz.com/edit/ngx-highlightjs-cteq4i?file=src%2Fapp%2Fhome%2Fhome.component.ts
Environment
- Angular: latest
- Browser(s): Chrome latest
- Operating System Windows latest
Murhaf Sousli commented
It seems that hljs was detecting the wrong language, you can force it to select from specific languages using the languages
input
<code [highlight]="code" [languages]="['ts']"></code>
Here is a fixed stackblitz
https://stackblitz.com/edit/ngx-highlightjs-8abqqm?file=src%2Fapp%2Fhome%2Fhome.component.html