Problem with syntax highlighting

Topics: Controls
Jun 15, 2012 at 10:16 AM

I can't get the syntax highlighting to work in version 2.6.0.5

When loading the page, the following requests returns 404's

http://alexgorbatchev.com.s3.amazonaws.com/pub/sh/3.0.83/styles/shCore.css

http://alexgorbatchev.com.s3.amazonaws.com/pub/sh/3.0.83/styles/shThemeDefault.css

Is this something that I can fix myself?

Jun 15, 2012 at 3:26 PM

I had the same problem and fortunately you gave me a nice tip just now :)

Yes, this's something you can fix yourself, SyntaxHightligher extension has a config file under App_Data\Datastore\Extensions, the name is SyntaxHighlighter.xml, open that file and change CDN links with:

http://alexgorbatchev.com/pub/sh/current/scripts/ (for scripts, current means latest version as you can see in http://alexgorbatchev.com/SyntaxHighlighter/hosting.html)
http://alexgorbatchev.com/pub/sh/current/styles/ (for styles)

I think this'll be enough but actually this's not what i did first so if you still can't get it work, then get the source code, open App_Code -> Extensions -> SyntaxHighlighter.cs and change the CDN links from there too, you'll see them under a static property named Options.