Installing syntaxhighlighter error: XregExp not defined
I recently installed syntaxhighlighter. The useful JavaScript tool for professional formatting of code blocks for blogs etc. by Alex Gorbatchev.
I followed the installation guide properly adding the shCore.js and brush scripts I needed. I also included shCore.css and shThemeDefault.css style files but kept receiving the same JavaScript error: XregExp not defined in shCore.js
It turns out after a lot of trial and error that you do not use the JavaScript files in the "/src/" folder of the download files. These do not work. You must use the 3 files with the same name in the "/scripts/" folder, specifically:
- shCore.js,
- shLegacy.js
- shAutoloader.js