What you'd probably have to do is have an if statement in the for loop:

var block=document.getElementsByTagName('pre');
for (var i = 0; i < block.length; i++) {
  hljs.highlightBlock(block[i]);
}

Something like 'if !(block[i].className && block[i].className ==
'no-highlight')' so that the highlightBlock code only runs on anything that
is not no-highlight.

I'm pretty sure all the 'normal' functionality is different simply because
I'm using 'highlightBlock'.

You can also try the alternative:

                var block=document.getElementsByTagName('pre');
                for (var i = 0; i < block.length; i++) {
                  var text = block[i].innerHTML;
                  block[i].innerHTML = '<code>'+text+'</code>';
                }
                hljs.initHighlighting();

Which basically makes fossil look like it has the right <pre><code>
tags for everything to work "normally".

Tomek




On Sun, Jun 26, 2011 at 1:50 AM, Ron Aaron <[email protected]> wrote:

> Hi,  Tomek -
>
> The footer code you have highlights everything marked as "pre" or
> "verbatim" etc.  However, it does not take into account any class
> information.
>
> For example, from the highlight.js docs
> (http://softwaremaniacs.org/soft/highlight/en/description/) I expect to
> be able to do:
>
> <verbatim class="no-highlight">
> ...
> </verbatim>
>
>
> But since the footer code doesn't pass on class information, that won't
> work.  Do you know how to make Javascript do what I'm describing?
>
> Thanks,
> Ron
>
>
> _______________________________________________
> fossil-users mailing list
> [email protected]
> http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users
>
_______________________________________________
fossil-users mailing list
[email protected]
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users

Reply via email to