New Format - Code tag options

Reply

Join Date: Jan 2008
Posts: 3,810
Reputation: VernonDozier has a reputation beyond repute VernonDozier has a reputation beyond repute VernonDozier has a reputation beyond repute VernonDozier has a reputation beyond repute VernonDozier has a reputation beyond repute VernonDozier has a reputation beyond repute VernonDozier has a reputation beyond repute VernonDozier has a reputation beyond repute VernonDozier has a reputation beyond repute VernonDozier has a reputation beyond repute VernonDozier has a reputation beyond repute 
Solved Threads: 501
Featured Poster
VernonDozier VernonDozier is offline Offline
Senior Poster

New Format - Code tag options

 
0
  #1
Sep 5th, 2009
I see a potential problem with the new format regarding code tags. Before, you had the option of doing this:


[code]
// paste code here - Courier-style fomatting, multiple spaces allowed, but no line numbers or syntax highlighting.
[/code]

or this:

[code=cplusplus]
// paste code here - Courier-style fomatting, multiple spaces allowed, line numbers and syntax highlighting.
[/code]


Both had their place. Very often I would choose to use the non-syntax specific code tags since I wanted to highlight something in red or because something was pseudocode rather than code and I didn't want the syntax highlighting, or it perhaps wasn't code at all, but I wanted something that would preserve the spacing and [quote] tags wouldn't do because they tend to disappear when replying to replies.

This option has apparently disappeared. When you type in:


[code]
[/code]


if you are in the C++ forum, you get the line numbers and syntax highlighting. I just posted on a new thread, saw it was happening, and changed it. But you have a whole bunch of old posts that look bad now, like this one:

http://www.daniweb.com/forums/post965858-19.html

You get stuff like this now:

<span style="color:Red">cout << "i = " << i << " Decrementing lCount\n"; </span>
coupled with instructions to look at the red line, which is no longer red.

Any way we can change back to the old way, without automatic language-specific syntax highlighting, or at least only make it automatic when parsing NEW threads?
Reply With Quote Quick reply to this message  
Join Date: Feb 2002
Posts: 12,036
Reputation: cscgal is a glorious beacon of light cscgal is a glorious beacon of light cscgal is a glorious beacon of light cscgal is a glorious beacon of light cscgal is a glorious beacon of light cscgal is a glorious beacon of light 
Solved Threads: 131
Administrator
Staff Writer
cscgal's Avatar
cscgal cscgal is online now Online
The Queen of DaniWeb

Re: New Format - Code tag options

 
0
  #2
Sep 5th, 2009
This ended up being a bug. I haven't yet had a chance to go over the new functionality of the code tags with everyone yet, but basically they are smart enough to know that if you're trying to use bbcode, don't force a language.
Dani the Computer Science Gal
Follow my Twitter feed! twitter.com/daniweb
Reply With Quote Quick reply to this message  
Join Date: Jan 2008
Posts: 3,810
Reputation: VernonDozier has a reputation beyond repute VernonDozier has a reputation beyond repute VernonDozier has a reputation beyond repute VernonDozier has a reputation beyond repute VernonDozier has a reputation beyond repute VernonDozier has a reputation beyond repute VernonDozier has a reputation beyond repute VernonDozier has a reputation beyond repute VernonDozier has a reputation beyond repute VernonDozier has a reputation beyond repute VernonDozier has a reputation beyond repute 
Solved Threads: 501
Featured Poster
VernonDozier VernonDozier is offline Offline
Senior Poster

Re: New Format - Code tag options

 
0
  #3
Sep 5th, 2009
Seems to parse fine if you go to the entire thread and read it, but not if you click on a particular post within the thread:

http://www.daniweb.com/forums/post965858.html

Go to thread 19 in the thread in this post and it parses with the non-language-specific code tags. Click on the post itself though, as I did when linking the first post on this thread, and language-specific code tags are added. The same post is parsed differently.
Reply With Quote Quick reply to this message  
Join Date: Feb 2002
Posts: 12,036
Reputation: cscgal is a glorious beacon of light cscgal is a glorious beacon of light cscgal is a glorious beacon of light cscgal is a glorious beacon of light cscgal is a glorious beacon of light cscgal is a glorious beacon of light 
Solved Threads: 131
Administrator
Staff Writer
cscgal's Avatar
cscgal cscgal is online now Online
The Queen of DaniWeb

Re: New Format - Code tag options

 
0
  #4
Sep 5th, 2009
Cache cleared
Dani the Computer Science Gal
Follow my Twitter feed! twitter.com/daniweb
Reply With Quote Quick reply to this message  
Join Date: Jan 2008
Posts: 3,810
Reputation: VernonDozier has a reputation beyond repute VernonDozier has a reputation beyond repute VernonDozier has a reputation beyond repute VernonDozier has a reputation beyond repute VernonDozier has a reputation beyond repute VernonDozier has a reputation beyond repute VernonDozier has a reputation beyond repute VernonDozier has a reputation beyond repute VernonDozier has a reputation beyond repute VernonDozier has a reputation beyond repute VernonDozier has a reputation beyond repute 
Solved Threads: 501
Featured Poster
VernonDozier VernonDozier is offline Offline
Senior Poster

Re: New Format - Code tag options

 
0
  #5
Sep 6th, 2009
The one I listed now works, but the problem remains for others, like this random thread I picked from the C++ forum just now.

http://www.daniweb.com/forums/thread220826.html

Same behavior as the prior thread I listed. See post 4. Code is in non-specific code tags and parses as such when viewing the full thread, but if you view it as a single thread and it parses to C++ syntax tags. I hit "Reply with quote" to see the underlying post and it was [code][/code] not [code=cplusplus][/code].
Reply With Quote Quick reply to this message  
Join Date: Feb 2002
Posts: 12,036
Reputation: cscgal is a glorious beacon of light cscgal is a glorious beacon of light cscgal is a glorious beacon of light cscgal is a glorious beacon of light cscgal is a glorious beacon of light cscgal is a glorious beacon of light 
Solved Threads: 131
Administrator
Staff Writer
cscgal's Avatar
cscgal cscgal is online now Online
The Queen of DaniWeb

Re: New Format - Code tag options

 
0
  #6
Sep 6th, 2009
That post was created while I was in the middle of fixing things so its cache got screwed up. Have a LOT on my plate right now so going to finish everything and then clear the cache one last time.
Dani the Computer Science Gal
Follow my Twitter feed! twitter.com/daniweb
Reply With Quote Quick reply to this message  
Join Date: Jan 2008
Posts: 3,810
Reputation: VernonDozier has a reputation beyond repute VernonDozier has a reputation beyond repute VernonDozier has a reputation beyond repute VernonDozier has a reputation beyond repute VernonDozier has a reputation beyond repute VernonDozier has a reputation beyond repute VernonDozier has a reputation beyond repute VernonDozier has a reputation beyond repute VernonDozier has a reputation beyond repute VernonDozier has a reputation beyond repute VernonDozier has a reputation beyond repute 
Solved Threads: 501
Featured Poster
VernonDozier VernonDozier is offline Offline
Senior Poster

Re: New Format - Code tag options

 
0
  #7
Sep 11th, 2009
I'm still noticing in the C++ section that [code][/code] is adding line numbers and saying "C++ Syntax". It's not supposed to do that, correct?
Reply With Quote Quick reply to this message  
Join Date: Feb 2009
Posts: 3,187
Reputation: sknake has much to be proud of sknake has much to be proud of sknake has much to be proud of sknake has much to be proud of sknake has much to be proud of sknake has much to be proud of sknake has much to be proud of sknake has much to be proud of sknake has much to be proud of sknake has much to be proud of 
Solved Threads: 571
Sponsor
sknake's Avatar
sknake sknake is offline Offline
.NET Enthusiast

Re: New Format - Code tag options

 
0
  #8
Sep 11th, 2009
Originally Posted by VernonDozier View Post
I'm still noticing in the C++ section that [code][/code] is adding line numbers and saying "C++ Syntax". It's not supposed to do that, correct?
Vernon,

You can get around that behavior. Take a look at this post:
http://www.daniweb.com/forums/post98...tml#post981568
Scott Knake
Custom Software Development
Apex Software, Inc.
Reply With Quote Quick reply to this message  
Join Date: Jan 2008
Posts: 3,810
Reputation: VernonDozier has a reputation beyond repute VernonDozier has a reputation beyond repute VernonDozier has a reputation beyond repute VernonDozier has a reputation beyond repute VernonDozier has a reputation beyond repute VernonDozier has a reputation beyond repute VernonDozier has a reputation beyond repute VernonDozier has a reputation beyond repute VernonDozier has a reputation beyond repute VernonDozier has a reputation beyond repute VernonDozier has a reputation beyond repute 
Solved Threads: 501
Featured Poster
VernonDozier VernonDozier is offline Offline
Senior Poster

Re: New Format - Code tag options

 
0
  #9
Sep 12th, 2009
Originally Posted by sknake View Post
Vernon,

You can get around that behavior. Take a look at this post:
http://www.daniweb.com/forums/post98...tml#post981568

Yeah, I just tried that in the C++ forum. Tried to post this:


[code][B][/B]./calcAverage 5 8 1 4[/code]

It added the C++ code tags, I would imagine since there's nothing to be bolded. Stick an empty space in between the Bold tags and that has no effect. Stick a printable character in between the Bold tags and it has the effect you mentioned. What if you want nothing bolded, as I did not?

I like it better the old way, where nothing was assumed and language-specific code tags were added only at the poster's option. Gives you more control of the post. Worse, the changes are retroactive. Posts prior to the change have the syntax added where it wasn't intended. I'm seeing it all over the place. Here's one of my old threads, chosen at random, See the bottom part of post 1. Syntax has been added where none was intended, so it doesn't look very good.

http://www.daniweb.com/forums/thread147949.html

Can pre-change posts at least no longer be parsed this way? Check the post date and see if it was pre-change and parse it differently based on that?
Reply With Quote Quick reply to this message  
Join Date: Apr 2006
Posts: 5,050
Reputation: John A is a splendid one to behold John A is a splendid one to behold John A is a splendid one to behold John A is a splendid one to behold John A is a splendid one to behold John A is a splendid one to behold John A is a splendid one to behold John A is a splendid one to behold 
Solved Threads: 332
Team Colleague
John A's Avatar
John A John A is offline Offline
Vampirical Lurker

Re: New Format - Code tag options

 
0
  #10
Sep 12th, 2009
You can do [code=text] to disable syntax highlighting completely:
  1. ./calcAverage 5 8 1 4

Anyway, I'm not digging the way these new code tags are handling things. They're not even backwards compatible with the old language tags (cplusplus, csharp, etc), and there were A LOT of posts that used code tags for stuff that wasn't 'code' (or wasn't the language of the forum). Thanks to the new parsing method, all these posts are going to be screwed up as VernonDozier mentioned.
"Technological progress is like an axe in the hands of a pathological criminal."
Reply With Quote Quick reply to this message  
Reply

Tags
codetags

Message:



Other Threads in the DaniWeb Community Feedback Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC