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

Marking specific subset of source code in addition to highlighting #64

Closed mcadariu closed 8 years ago

mcadariu commented 8 years ago

Hi,

Thanks for the really useful library, great work.

I'd like to ask for a little guidance to proceed, help appreciated.

How can I use angular-highlightjs to "mark" a subset of the source code lines with yellow background?

This JSFiddle shows what I mean, which works with highlight.js: http://jsfiddle.net/tovic/059x3ygs/2/

Thanks, Mircea

pc035860 commented 8 years ago

Hi @mcadariu ,

It's not possible for current angular-highlightjs, the stream-merging feature can only be invoked by hljs.highlightBlock(), and angular-highlightjs's implementation uses hljs.highlight().

mcadariu commented 8 years ago

Hi,

Clear, many thanks for the helpful clarification!

Greetings, Mircea