New Format - Code tag options

Reply

Join Date: Sep 2007
Posts: 1,436
Reputation: cwarn23 has a spectacular aura about cwarn23 has a spectacular aura about cwarn23 has a spectacular aura about 
Solved Threads: 133
cwarn23's Avatar
cwarn23 cwarn23 is offline Offline
Nearly a Posting Virtuoso

Re: New Format - Code tag options

 
0
  #11
Sep 12th, 2009
Originally Posted by VernonDozier View Post
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?
The way I found best is by putting a dot between the [b].[/b] tags. So the following is an example of what your code should have looked like:

[code][B].[/B]/calcAverage 5 8 1 4[/code]
Try not to bump 10 year old threads as it can be really annoying.
Like php then read my website at http://syntax.cwarn23.net/
Star-Trek-Atlantis - now that's what I call a movie ^_^
My favourite PC. - MacGyver Fan
Bad english note: dis-iz-2b4u
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
  #12
Sep 13th, 2009
Originally Posted by cwarn23 View Post
The way I found best is by putting a dot between the [b].[/b] tags. So the following is an example of what your code should have looked like:

[code][B].[/B]/calcAverage 5 8 1 4[/code]
Yeah, I guess no one will notice a bold dot, so there are workarounds. I think it would be better to go back to the old way where nothing was assumed and you had to make it explicit.

Originally Posted by John A View Post
You can do [code=text] to disable syntax highlighting completely:
  1. ./calcAverage 5 8 1 4
Thanks. I hadn't realized this. Good to know.

Originally Posted by John A View Post
They're not even backwards compatible with the old language tags (cplusplus, csharp, etc)
"Old" language tags? I remember about a year ago being told not to use [code=C++] when I was using it, but to use [code=cplusplus] instead. Are we not using [code=cplusplus] anymore? And if so, what are we supposed to use now? C++? CPP? cplusplus still seems to work.

These threads should probably be updated to explain the new rules in detail.

http://www.daniweb.com/forums/misc-explaincode.html
http://www.daniweb.com/forums/announcement8-3.html
Last edited by VernonDozier; Sep 13th, 2009 at 1:46 am.
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
  #13
Sep 13th, 2009
>Are we not using [code=cplusplus] anymore?
Nope. Apparently, now we're supposed to be using the name of the forum (for example, [code=c++], [code=c#], etc.).

>cplusplus still seems to work.
That's the thing. If you specify an "invalid language", the syntax defaults to the language of the forum. Which means that, for example, if I had posted code with the [code=cplusplus] tag in the Java forum (perhaps to illustrate differences in the language), the code will now be highlighted as Java. Which I find completely ridiculous.
"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