views:

562

answers:

2

Is there any way to remove the line numbers of SyntaxHighlighter?

Thanks!

+2  A: 

Hit the "view plain" link?

Taking a look at the SyntaxHighlighter demo you will see it has buttons in the top right corner which you can click to either copy the code to your clipboard, see the actual source code (removing markup) and or print it.

Are you asking us how to remove the actual feature that adds the line numbers while still keeping the rest of the functionality in place? Are you asking us to do this for you?

In response to comment:

If you want to keep the functionality in place, and just remove the line numbers you will need to download a copy of the javascript file for yourself and remove the features you don't want. the SyntaxHighlighter download page allows you to download your very own version of the highlighter, it also tells you that is is licensed under the LGPL 3, which means you have to follow those rules when you make and use your modifications.

If you want, you may come back and ask individual Javascript questions, if you get stuck in a particular spot, but we are not TopCoder nor will we re-write code for you.

X-Istence
nah... want it colored =)
Paulo
no, I'm not. I'm just asking if anybody knows how to make it render without the line numbers. If there is no such option, I'll just modify it myself. Thanks
Paulo
+3  A: 

You can set the SyntaxHighliter's gutter configuration to false. This will remove the line number from your code.

<pre class="brush: java; gutter: false;"></pre>
In fact, one can do this "inline", per code snippet:<script class="brush: python;gutter: false" type="syntaxhighlighter"><![CDATA[ <code> range(1027) </code>]]></script>
gphilip