Skip to Content
author's profile photo Former Member
Former Member

Code syntax highlighting (some troubles)

I've noticed the new fancy code highlighting thingy that has been recently added... Looks good!

But it has some trouble with commentling lines...

[code]//This goes wrong!

string something = "Some string";[/code]

This also goes wrong:[code]'VB escapes also trouble

Dim foo As String

foo = "Some string"[/code]

This goes all right:[code]/* Hmz, normally used for comments over multiple lines */

string something = "Some string";[/code]

Not recognized:[code]# PHP (and some other languages) syntax

$something = "Some string";[/code]

I'm also noticing that blank lines not work. If I want add a blank line between some pieces of code, the syntax highlighting removes them, causing all code to pile up to one big text. See below, I've added an blank line between the second and the thirth line. But it piles up :([code]/* Comment 1 */

string s1 = "Uhhh";

/*Comment 2 */

int x = 15;[/code]

Notice also that 'int' is recognized as a variable, (it turns blue) but 'string' and 'bool' (and I guess some more) are not.

Also "" is marked as string (red) but '' is recognized as something else (variable? blue).[code]/* Two strings? */

string a = "Nice string! :)";

string b = 'Not a string? :(';[/code]

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • author's profile photo Former Member
    Former Member
    Posted on Oct 21, 2005 at 12:49 PM

    Are you referring to using the BBCode "code"?

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.