Best practice for formatting code in blog posts(blurpr.com)
blurpr.com
Best practice for formatting code in blog posts
https://www.blurpr.com/blog/?p=36
2 comments
The result really isn't any better than what most blogs have. Yes it's highlighted and yes there is a horizontal scroll bar at the bottom to accommodate long lines but that seems fairly standard today.
What I care about is not having the line numbers in there. Makes copying-and-pasting a huge pain.
I know I've seen code with formatted line numbers in places that still allowed proper c'n'p functionality. I can't think where though.
I was under the impression that a work around had been found for that but as I'm unable to find a tutorial or any discussion I could have imagined it.
Having to strip the line numbers out is a real pain. I agree totally with you on that. However, as the presence of line numbers is normally configurable in the highlighting plugins I still see nothing new here.
Having to strip the line numbers out is a real pain. I agree totally with you on that. However, as the presence of line numbers is normally configurable in the highlighting plugins I still see nothing new here.
Stripping the line numbers is not that difficult. In emacs, position the point at the beginning of the document, then hit M-> to go to the end, then move the point to the first non-line-number character, then hit C-x r k.
Problem solved.
Problem solved.
@philjr: Some of the flash/javascript that does copy & paste without pulling the numbers doesn't work in Google Reader and many other aggregators.