pc035860 / angular-highlightjs

AngularJS directive for syntax highlighting with highlight.js
http://pc035860.github.io/angular-highlightjs/example/
MIT License
294 stars 53 forks source link

Less-than-sign displaying as < #86

Closed ghost closed 7 years ago

ghost commented 7 years ago

This code...

<div hljs hljs-language="javascript">
  alert(1 < 2);
</div>

...is displayed as...

alert(1 &lt; 2);

Is there a way around this or is this a bug? Plunker demo: https://plnkr.co/edit/RYkDoHgSwt5lyqBXFRvj

pc035860 commented 7 years ago

Hi @JaredMathis

Use hljs-include and place your code in a separate file or script tag to prevent your code from parsing by browser.

For more information, see #59

ghost commented 7 years ago

Thanks a lot @pc035860!!