如何使用Alex Gorbatchev编写的最新版(3.0.83)语法高亮工具?
How to use the latest version(3.0.83) of syntax highlighter written by Alex Gorbatchev?
我正在尝试使用语法荧光笔,但它不起作用。
这是你好,世界样本。
<!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>
语法没有突出显示。
您忘记了 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>
我正在尝试使用语法荧光笔,但它不起作用。 这是你好,世界样本。
<!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>
语法没有突出显示。
您忘记了 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>