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

Nested hljs #72

Closed jlouazel closed 11 months ago

jlouazel commented 8 years ago

Hi,

I was trying to make the following example works:

index.html

<p>What is the answer to life the universe and everything?</p>
<div hljs include="'views/answer.html'"></div>

answer.html

<b>42</b>

<p>I'm sorry, what's the right question to get the answer I want?</p>
<div hljs include="'views/right-question.html'"></div>

We'll never know what's inside right-question.html because the result is like the following:

<p>What is the answer to life the universe and everything?</p>
<b>42</b>
<p>I'm sorry, what's the right question to get the answer I want?</p>
<div hljs include="'views/right-question.html'"></div>

So my guess is that angular-highlightjs does not handle nested calls but maybe I'm missing something. What do you think about that?

Thanks

pc035860 commented 8 years ago

Hi @jlouazel

Yes, angular-highlightjs doesn't support nested usage. You'll have to find another way to achieve the effect you want.