SyntaxHighlighter Missing XRegExp.js

I just ran into an issue when I updated my javascript files for SyntaxHighlighter.

Looked at the error console and discovered that shCore.js could not find XRegExp.js.

This blog link was a great start.

Additional Details

  1. Syntax Highlighter Git Repo
  2. Get the XRegExp.js from the scripts directory: /SyntaxHighlighter/scripts/XRegExp.js
  3. In your page above the shCore.js add XRegExp.js

Page Header Example

<script src='js/jquery-1.6.3.min.js' type='text/javascript'></script>
<script type="text/javascript" src="js/syntaxhighlighter/XRegExp.js"></script>
<script type="text/javascript" src="js/syntaxhighlighter/shCore.js"></script>
<script type="text/javascript" src="js/syntaxhighlighter/shBrushPlain.js"></script>
<script type="text/javascript" src="js/syntaxhighlighter/shBrushJava.js"></script>
<script type="text/javascript" src="js/syntaxhighlighter/shBrushGroovy.js"></script>
<script type="text/javascript" src="js/syntaxhighlighter/shBrushXml.js"></script>
<script type="text/javascript" src="js/syntaxhighlighter/shBrushCss.js"></script>
<link href="css/syntaxhighlighter/shCore.css" rel="stylesheet" type="text/css">
<link href="css/syntaxhighlighter/shThemeDefault.css" rel="stylesheet" type="text/css">

About Gordon

Technology enthusiast primarily focused on Java and Open Source projects. Spring Certified Professional and Trainer. http://twitter.com/gdickens http://linkedin.com/in/gordondickens http://github.com/gordonad
This entry was posted in JavaScript, jQuery, SyntaxHighlighter and tagged , , , , , . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *


*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>