admin管理员组文章数量:1296473
I wanted to play with SyntaxHighlighter so I downloaded the lastest version from /. The src/shCore.js file which is a unpacked/unencoded version does not seem to work when I change from scripts/shCore.js to src/shCore.js in the index.html that e with the download.
Does anyone know why or know where I can get a working source code so I can have a play.
Thanks
I wanted to play with SyntaxHighlighter so I downloaded the lastest version from http://alexgorbatchev./SyntaxHighlighter/. The src/shCore.js file which is a unpacked/unencoded version does not seem to work when I change from scripts/shCore.js to src/shCore.js in the index.html that e with the download.
Does anyone know why or know where I can get a working source code so I can have a play.
Thanks
Share Improve this question asked Feb 8, 2011 at 20:17 JohnJohn 515 bronze badges3 Answers
Reset to default 9Yes. SyntaxHighlighter version 3.0.83 requires Steven Levithan's XRegExp.js library ver 1.5.0. The pressed version of SH which works (scripts/shCore.js
16,175 bytes), has XRegexp.js built-in. However, the unpressed version, (src/shCore.js
43,502 bytes) will not work until you place a copy of XRegExp.js into the same folder (It is not included in the src folder in the download file.)
Note that if you download the full source archive, this includes the unpressed XRegExp.js
file and will allow you to play around with it and pile/press it if you want.
Note also, that there is a pretty wicked bug in SyntaxHighlighter which causes it to get confused and incorrectly colorize code. I have written an article describing the bug, and how to fix it. See: Fixing the SyntaxHighlighter 3.0.83 Parser Bug. I notified the author about the bug but an official fix has not yet been implemented.
This answer is a bit late, but I still hope it may helps someone...
excellent adding!
for debugging, go to wp-content\plugins\syntax-highlighter-press\syntax-highlighter-press.php
and add the following line to wp_shc_head() :
<!-- START: Syntax Highlighter ComPress -->
<script type="text/javascript" src="http://xregexp./xregexp.js"></script>
These days, v.2.0.0 broke the Syntax Highlighter code, so be sure to include both:
<script type="text/javascript" src="http://xregexp./xregexp.js"></script>
<script type="text/javascript" src="http://xregexp./addons/backpat.js"></script>
本文标签: javascriptSyntaxHighlighter v3083 source codeStack Overflow
版权声明:本文标题:javascript - SyntaxHighlighter v3.0.83 source code - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1741624146a2388987.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论