Closed sergey-morenets closed 8 years ago
Can you provide an example plunk to demonstrate the issue?
The hljs-language
always works in the example page. I guess the bug is caused by how you use it.
Hi
Thank you for the response. As I mentioned most often language is configured correctly. You can look at this link. http://it-simulator.com/#/article/1/133
There are four code blocks there. First one has "java" class, other three blocks "coffeescript", "php" and "cs".
Thank you.
Hi, I noticed that you're using angular-highlightjs 0.3.3, which is not the latest version (which is 0.5.1). http://it-simulator.com/scripts/angular-highlightjs.min.js
Can you try to upgrade it to the latest version? There was a fix for the hljs-language
in ng-repeat
issue.
See the releases & changelogs.
You can grab the latest build at http://pc035860.github.io/angular-highlightjs/angular-highlightjs.min.js
Hi
Thank you the response. I tried to upgrade to 0.5.1 version but it didn't work for me. I got an error:
Error: b is undefined .$get@http://it-simulator.com/scripts/angular-highlightjs.min.js:6:535
0.5.0 version doesn't work as well.
Here is more descriptive error message: Error: hljs is undefined .$get@http://it-simulator.com/scripts/angular-highlightjs.js:47:8
I finally got it working by moving highlight.min.js upper than angular-highlight.min.js in html file. Thank you, you can close this issue.
Hi
I'm using angular-highlightjs for my site and always specify language, for example, hljs-language="java". However I often see incorrect language in the resulting HTML. Sometimes it's correct: [code class="hljs java"]. Sometimes [code class="hljs cs"] or [code class="hljs cpp"]. Please advise.