![]() |
Something wrong with copy from text in code tags.
Something seems to have gone wrong with the site.
When I copy code within code tags, for example at http://www.codingforums.com/showthread.php?t=280407 I get <script type = "text/javascript"> String.prototype.isValidDate = function(){ var arrParts = this.split("/"); var date1 = new Date(this.toString()); dtReturn = (date1.getMonth()+1 == parseInt(arrParts[0],10) && date1.getDate() == parseInt(arrParts[1],10) && date1.getFullYear() == parseInt(arrParts[2],10) ); return dtReturn; // true or false } var strDate1 = "01/31/2012"; // USA date format var strDate2 = "2/31/2012"; alert(strDate1 + ": " + strDate1.isValidDate()); alert(strDate2 + ": " + strDate2.isValidDate()); </script> Read more at http://www.codingforums.com/showthre...85cu8q5lqo7.99 Note that the newlines are lost and a message about "read more" is appended. Is this something to do with Facebook/Twitter? It is an annoying glitch! |
Any follow up on this? Or is it a new feature :rolleyes:?
|
I noticed this too; started up about a week ago. I copy from mainly PHP tags and I don't believe I loose the linefeeds, I'll have to try on code ones too.
Its a little annoying I have to admit yeah. I would suggest that the way to fix it is to either remove it completely or make it so the paste doesn't apply that line if pasted back into codingforums.com. I'm not sure where it comes from, so masmedia is looking into any of the new functionality added to see if it could include that. |
It is the loss of the line breaks which is the biggest annoyance. That will cause significant problems for newcomers who are trying to copy and paste code into their own pages. Not user-friendly! :(
As you say, it dos not happen with php tags, so why does it happen with Javascript code tags? It must be a coding error. Please fix it soon - whoever did it managed to introduce this glitch into the forum up within hours, so why can he not put it right in hours? |
It looks as though this problem has now been resolved! :thumbsup:
|
| All times are GMT +1. The time now is 01:01 PM. |
Powered by vBulletin®
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.