color in a code block

Page 1 of 1

9 Replies - 750 Views - Last Post: 15 March 2011 - 12:31 PM

#1 r.stiltskin   User is offline

  • D.I.C Lover
  • member icon

Reputation: 2034
  • View blog
  • Posts: 5,436
  • Joined: 27-December 05

color in a code block

Posted 15 March 2011 - 12:04 PM

It used to be that whenever I tried to use the color attribute inside code tags, all I got was the literal color tags and no color. Now I see that janotte was able to use colored code in this post so I tried again and when I looked at the preview I seemed to get the red-colored text but also the color tags.

Now I seem to be back to color tags only, with no color:
void [color="#FF0000"]remove[/color]( int );


What gives?

Is This A Good Question/Topic? 0
  • +

Replies To: color in a code block

#2 macosxnerd101   User is offline

  • Games, Graphs, and Auctions
  • member icon




Reputation: 12800
  • View blog
  • Posts: 45,992
  • Joined: 27-December 08

Re: color in a code block

Posted 15 March 2011 - 12:06 PM

skyhawk133 has been upgrading the code tags for language-specific brushes in the respective forums. C++ has been one of the forums upgraded. :)
Was This Post Helpful? 0
  • +
  • -

#3 r.stiltskin   User is offline

  • D.I.C Lover
  • member icon

Reputation: 2034
  • View blog
  • Posts: 5,436
  • Joined: 27-December 05

Re: color in a code block

Posted 15 March 2011 - 12:13 PM

Ah, I see. But it doesn't seem to be working correctly as you can see here.

This post has been edited by r.stiltskin: 15 March 2011 - 12:14 PM

Was This Post Helpful? 0
  • +
  • -

#4 skyhawk133   User is offline

  • Head DIC Head
  • member icon

Reputation: 1981
  • View blog
  • Posts: 20,434
  • Joined: 17-March 01

Re: color in a code block

Posted 15 March 2011 - 12:14 PM

It highlights based on the language forum you're in. If you're in C++, you get C++ highlighting, in non-language specific forums, you get generic highlighting.
Was This Post Helpful? 0
  • +
  • -

#5 r.stiltskin   User is offline

  • D.I.C Lover
  • member icon

Reputation: 2034
  • View blog
  • Posts: 5,436
  • Joined: 27-December 05

Re: color in a code block

Posted 15 March 2011 - 12:19 PM

I'm not talking about ordinary syntax highlighting. I was referring to this post, where janotte highlighted a specific word to point it out to the OP.
Was This Post Helpful? 0
  • +
  • -

#6 skyhawk133   User is offline

  • Head DIC Head
  • member icon

Reputation: 1981
  • View blog
  • Posts: 20,434
  • Joined: 17-March 01

Re: color in a code block

Posted 15 March 2011 - 12:21 PM

HE DIDN'T HIGHLIGHT IT. IT DID IT AUTOMATICALLY. IT'S ONE OF THE FUNCTION NAMES IN THE SYNTAX HIGHLIGHTER.

I don't know why "remove" is the only word it's highlighting. The list of functions in the highlighter is quite short for C++. When I'm done with client work, I'll look at expanding the list.
Was This Post Helpful? 1
  • +
  • -

#7 Dogstopper   User is offline

  • The Ninjaducky
  • member icon

Reputation: 2975
  • View blog
  • Posts: 11,224
  • Joined: 15-July 08

Re: color in a code block

Posted 15 March 2011 - 12:22 PM

There are no extra color tags in that post. It's all done with the CSS! The remove() and int are just being highlighted. You can do a quoted reply to look at the text of a post.
Was This Post Helpful? 0
  • +
  • -

#8 AdamSpeight2008   User is offline

  • MrCupOfT
  • member icon

Reputation: 2298
  • View blog
  • Posts: 9,535
  • Joined: 29-May 08

Re: color in a code block

Posted 15 March 2011 - 12:23 PM

The remove is possible a keyword that is being highlighted by the brush. janotte is not using the color tags to highlight it.
Was This Post Helpful? 0
  • +
  • -

#9 r.stiltskin   User is offline

  • D.I.C Lover
  • member icon

Reputation: 2034
  • View blog
  • Posts: 5,436
  • Joined: 27-December 05

Re: color in a code block

Posted 15 March 2011 - 12:26 PM

Well I'll be damned!

OK
Was This Post Helpful? 0
  • +
  • -

#10 AdamSpeight2008   User is offline

  • MrCupOfT
  • member icon

Reputation: 2298
  • View blog
  • Posts: 9,535
  • Joined: 29-May 08

Re: color in a code block

Posted 15 March 2011 - 12:31 PM

oooh! raising imaginary handbag
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1