Line numbers in code blocks
-
Would be useful to refer to specific lines in the code PRE blocks when explaining functionality.
1 string s = null;
2
3
4 string s = null;
5 string s = null;
5 string s = null;
6 string s = null;
7 string s = null;E.g. "Lines 4-7 calculate the coffee strength required for optimum productivity." Has this idea ever been considered?
"For fifty bucks I'd put my face in their soup and blow." - George Costanza
CP article: SmartPager - a Flickr-style pager control with go-to-page popup layer.
-
Would be useful to refer to specific lines in the code PRE blocks when explaining functionality.
1 string s = null;
2
3
4 string s = null;
5 string s = null;
5 string s = null;
6 string s = null;
7 string s = null;E.g. "Lines 4-7 calculate the coffee strength required for optimum productivity." Has this idea ever been considered?
"For fifty bucks I'd put my face in their soup and blow." - George Costanza
CP article: SmartPager - a Flickr-style pager control with go-to-page popup layer.
I've thought about it, and there are a few javascript includes that will do this for us. Just not sure... Maybe we need a vote on it.
cheers, Chris Maunder
CodeProject.com : C++ MVP
-
I've thought about it, and there are a few javascript includes that will do this for us. Just not sure... Maybe we need a vote on it.
cheers, Chris Maunder
CodeProject.com : C++ MVP
Why don't you just make it a setting in the article submission wizard, and default it to "off".
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997
-----
"...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001 -
I've thought about it, and there are a few javascript includes that will do this for us. Just not sure... Maybe we need a vote on it.
cheers, Chris Maunder
CodeProject.com : C++ MVP
How about an attribute on the
PRE
tag? IIRC you can set the "lang" attribute to specify the syntax highlighting. So maybe "lineNumbers='true'" could enable the line numbers."For fifty bucks I'd put my face in their soup and blow." - George Costanza
-
How about an attribute on the
PRE
tag? IIRC you can set the "lang" attribute to specify the syntax highlighting. So maybe "lineNumbers='true'" could enable the line numbers."For fifty bucks I'd put my face in their soup and blow." - George Costanza