How to use the latest version(3.0.83) of syntax highlighter written by Alex Gorbatchev?

I am trying to use syntax highlighter but it is not working. Here is the hello, world sample.

<!doctype html>
<html>
    <head>
        <link href="http://alexgorbatchev.com/pub/sh/current/styles/shCore.css" rel="stylesheet" type="text/css" />
        <link href="http://alexgorbatchev.com/pub/sh/current/styles/shThemeDefault.css" rel="stylesheet" type="text/css" />
        <script src="http://alexgorbatchev.com/pub/sh/current/scripts/shCore.js" type="text/javascript"></script>
        <script src="http://alexgorbatchev.com/pub/sh/current/scripts/shBrushCpp.js" type="text/javascript"></script>
    </head>

    <body>
<pre class"brush:cpp;">
int main()
{
    std::cout << "Hello, world!";
    return 0;
}
</pre>
    <script type="text/javascript">
        //SyntaxHighlighter.config.bloggerMode = true;
        SyntaxHighlighter.all();
    </script>
</body>
</html>

The syntax isn't getting highlighted.

Upvotes: 0

Views: 655

Answers (1)

Praveen Gowda I V
Praveen Gowda I V

Reputation: 9637

You forgot the = after class.

<!doctype html>
<html>
    <head>
        <link href="http://alexgorbatchev.com/pub/sh/current/styles/shCore.css" rel="stylesheet" type="text/css" />
        <link href="http://alexgorbatchev.com/pub/sh/current/styles/shThemeDefault.css" rel="stylesheet" type="text/css" />
        <script src="http://alexgorbatchev.com/pub/sh/current/scripts/shCore.js" type="text/javascript"></script>
        <script src="http://alexgorbatchev.com/pub/sh/current/scripts/shBrushCpp.js" type="text/javascript"></script>
    </head>

    <body>
<pre class="brush:cpp;">
int main()
{
    std::cout << "Hello, world!";
    return 0;
}
</pre>
    <script type="text/javascript">
        //SyntaxHighlighter.config.bloggerMode = true;
        SyntaxHighlighter.all();
    </script>
</body>
</html>

Upvotes: 2

Related Questions