Code Line Numbers? Colorized Code?
-
Is there a way to post code with line numbers? Is there a way to colorize code (the way Visual Studio colorizes code)?
-
Is there a way to post code with line numbers? Is there a way to colorize code (the way Visual Studio colorizes code)?
Unfortunately the only way to do line numbers is either to already have them in your code and put the <pre> block around it, or to add the line numbers manually. As for colorizing the code, you certainly can. There are a couple of ways to do it, one is to add the language tag in the code, the other is the use the dropdown to add it: CodeProject Article FAQ - Part 2: How to Post an Article on CodeProject [^]
Thanks, Sean Ewington CodeProject
-
Unfortunately the only way to do line numbers is either to already have them in your code and put the <pre> block around it, or to add the line numbers manually. As for colorizing the code, you certainly can. There are a couple of ways to do it, one is to add the language tag in the code, the other is the use the dropdown to add it: CodeProject Article FAQ - Part 2: How to Post an Article on CodeProject [^]
Thanks, Sean Ewington CodeProject
Can't you just add
linecount="on"
to the<pre>
like you can in the forums and QA?<pre lang="Plain" linecount="on">
Line 1
Line 2
Etc.
</pre>Line 1
Line 2
Etc.
"These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer