Simple Machines Community Forum

SMF Development => Feature Requests => Applied or Declined Requests => Aiheen aloitti: Bront - toukokuu 11, 2007, 02:31:52 AP

Otsikko: Using BBCode in the Code Tags
Kirjoitti: Bront - toukokuu 11, 2007, 02:31:52 AP
I see that inside the CODE tags, BBCode doesn't work.  Is there a way to fix that?

I'm looking for something that doesn't trunkate tabs or extra spaces so I can line things up with text.
Otsikko: Re: Using BBCode in the Code Tags
Kirjoitti: metallica48423 - toukokuu 11, 2007, 02:59:56 AP
i believe its designed not to, its supposed to be used as simply to display code bits without parsing smilies, bbcode, or anything else.  It is simply supposed to display code snippets without interrupting them in formatting and such :P

you could use [quote] and [/quote] which does similar and DOES parse BBC
Otsikko: Re: Using BBCode in the Code Tags
Kirjoitti: Thantos - toukokuu 11, 2007, 10:42:04 AP
LainaaI see that inside the CODE tags, BBCode doesn't work.  Is there a way to fix that?
Can't fix what isn't broken.

I know some people like it so they can color their code, but really it can cause way more problems then it worth.

Example:


arr[i] = 5;
printf("%d[/i]", arr[i]);

With BBC parsing on you'd have:
Lainaa
arr = 5;
printf("%d
", arr);

Which doesn't make a lot of sense and greatly changed the code.