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

Comments added when <?php tags are included in the snippet #71

Open nine-2-five opened 8 years ago

nine-2-five commented 8 years ago

This snippet:

<div hljs>
<?php
echo "<h2>PHP is Fun!</h2>";
echo "Hello world!<br>";
echo "I'm about to learn PHP!<br>";
echo "This ", "string ", "was ", "made ", "with multiple parameters.";
?>
</div>

results in this output: image

pc035860 commented 8 years ago

The issue caused by < or > in HTML can be solved using hljs-include. See here: https://github.com/pc035860/angular-highlightjs/issues/59#issuecomment-178765205