Give me the liberty to disable this problematic syntax highlighting script, please. It does more harm for me than good.
-
What is so problematic about it? I don't notice anything wrong with the results of it.– SampsonCommented Sep 4, 2009 at 21:01
-
1It's weak on several languages like VB, even sql somewhat.– Joel Coehoorn ModCommented Sep 4, 2009 at 21:48
-
It's also just plain terrible on Perl.– Brad GilbertCommented Sep 8, 2009 at 0:48
-
@Brad: <insert cheap shot about Perl here>.– Andrew GrimmCommented Oct 18, 2010 at 7:19
-
Way I seen it now: "user130648 request to make javascript syntax highlighter to upset". I think title could use some rewording.– MołotCommented Jul 3, 2013 at 9:14
Add a comment
|
1 Answer
Use <pre>
instead.
$(function(){
$("div.someBox").remove();
});
vs
$(function(){ $("div.someBox").remove(); });
If you wanated to disable this, you could do so with a greasemonkey script and firefox. You'd have to get the $.text() value of the pre.prettyprint, and then replace the pre.prettyprint with code tags.
-
Does PRE stop the Javascript syntax highlighter from highlighting it on window.onload? Commented Sep 4, 2009 at 20:51
-
1How can I get other people to do this so when I open a question it doesnt screw everything up? Commented Sep 4, 2009 at 20:56
-
The service used to highlight code only works on the
<code>
tags if I'm not mistaken, so you should use the<pre>
tags when you want to display code without having it highlighted. If you're experiencing serious problems with the rendering, you should probably consider submitting a bug-report.– SampsonCommented Sep 4, 2009 at 20:58 -
When I copy it, it all gets scrunched into one line. It converts string literal in my code into an actual space. In one answer, my HTML decoding code snippet ended up removing every space from the given string, instead of nbsp; Commented Sep 4, 2009 at 21:39
-
That task should not be left up to the client machine anyways. It's BS. Commented Sep 4, 2009 at 21:40
-
The OP wants to disable it on the local browser, not globally. Commented Sep 8, 2009 at 0:50
-
-
3Note that if you are trying to disable syntax highlighting for a preformatted block (that you are authoring), it appears that
<!-- language: none -->
is the preferred mechanism.– PhrogzCommented Mar 31, 2011 at 22:30