Forum How do I...?

Problem with Highlight.js

Lindemann
Sorry, maybe I missed something...I try to use Highlight.js http://softwaremaniacs.org/soft/highlight/en/ for Code Highlighting, but it didn't work.
I run:
$ prince --javascript index.html


The HTML looks like this:
<!DOCTYPE html>
<html>
    <head>
        <title>HighlightJS</title>
        <meta http-equiv = "Content-Type" content = "text/html; charset=UTF-8">
        <link rel="stylesheet" href="github.css">
        <script src="highlight.pack.js"></script>
        <script>hljs.initHighlightingOnLoad();</script>
    </head>
    <body>
        <h1>
            HighlightJS <3 <3 <3
        </h1>
        <pre>
            <code class="objectivec"> 
- (IBAction)segmentedControlPressed:(UISegmentedControl *)sender {
    if (sender.selectedSegmentIndex == 0) {
//        [self.textView becomeFirstResponder];
        [self.webView removeFromSuperview];
        self.webView = nil;
    } else {
        [self.textView resignFirstResponder];
        self.webView = [[UIWebView alloc] initWithFrame:self.view.frame];
        NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
        NSString *documentsDirectory = [paths objectAtIndex:0];
        NSString *path = [documentsDirectory stringByAppendingPathComponent:@"file.html"];
        
        [self.webView loadRequest:[NSURLRequest requestWithURL:[NSURL fileURLWithPath:path]]];
    }
}
            </code>
        </pre>
    </body>
</html>


Does it not work because I make a mistake, or because Prince cant handle Highlight.js? And if this is the case, can I use another JS for Code Highlighting?
mikeday
There are some additional JavaScript DOM methods we need to support in Prince before HighlightJS will work properly. We will do some investigation and see if we can support this library in the next release of Prince.
mikeday
Prince 9 is now available, and supports HighlightJS! :D