We failed to migrate ngx-highlightjs in our project from 10.0 to 12.0 because of the multiple errors in the console.
Please note, that new version added "language" property so the error may relate to this feature.
Reproduction
We couldn't reproduce this issue in StackBlitz (https://stackblitz.com/edit/ngx-highlightjs) because the changes were rebuilding too much (more than 15 mins) and probably stuck.
TypeError: t2.substr is not a function
at Object.f [as highlight] (global:scripts.js:10:4593)
at _HighlightJS.<anonymous> (ngx-highlightjs.mjs:185:17)
at Generator.next (<anonymous>)
Environment
Angular: 18.0.3
ngx-highlightjs: 12.0.0
Browser(s): Сhrome
Operating System (e.g. Windows, macOS, Ubuntu): Windows
Hi
We failed to migrate ngx-highlightjs in our project from 10.0 to 12.0 because of the multiple errors in the console. Please note, that new version added "language" property so the error may relate to this feature.
Reproduction
We couldn't reproduce this issue in StackBlitz (https://stackblitz.com/edit/ngx-highlightjs) because the changes were rebuilding too much (more than 15 mins) and probably stuck.
Expected Behavior
No issues should happen
Actual Behavior
If I use this line in the template:
<pre><code [highlight]="'int a'" language="java"></code></pre>
I see an error in the console:
If I use this line in the template:
<pre><code [highlight]="'java'" language="java"></code></pre>
I see this error in the console:
Environment