Modify

Opened 5 years ago

Closed 5 years ago

Last modified 5 years ago

#6662 closed defect (fixed)

Syntax highlighting is not longer working for C#

Reported by: rjollos Owned by: nuald
Priority: normal Component: CodeExampleMacro
Severity: normal Keywords:
Cc: Trac Release: 0.11

Description

I have a C# code snipet for which syntax highlighting was working correctly in version 0.3, but no longer works correctly after upgrading to [7633].

{{{
#!GoodCodeExample
#!c#
private static double GetDistance(PointF point1, PointF point2)
{
    //pythagorean theorem c^2 = a^2 + b^2
    //thus c = square root(a^2 + b^2)
    double a = (double)(point2.X - point1.X);
    double b = (double)(point2.Y - point1.Y);

    return Math.Sqrt(a * a + b * b);
}
}}}

Attachments (1)

NoCSharpSyntaxHighlighting.png (10.0 KB) - added by rjollos 5 years ago.

Download all attachments as: .zip

Change History (7)

Changed 5 years ago by rjollos

comment:1 Changed 5 years ago by nuald

  • Status changed from new to assigned

comment:2 Changed 5 years ago by nuald

  • Resolution set to fixed
  • Status changed from assigned to closed

Fixed in r7635.

comment:3 Changed 5 years ago by rjollos

It looks like I was probably using invalid syntax here. When #!c# is specified as the code processor, it appears that the C code processor is used. The correct syntax for c# is #!cs.

comment:4 Changed 5 years ago by rjollos

I did some additional investigation to confirm that my description in comment:3 was correct. It was probably still slightly useful to fix, but not really a valid defect report (sorry about that!).

Thanks again for all of the great work you did on this macro.

comment:5 Changed 5 years ago by rjollos

!c# is a valid wiki processor as of a revision introduced today in [t 9305]. See also t:wiki:0.12/TracSyntaxColoring#SyntaxColoringSupport.

comment:6 Changed 5 years ago by rjollos

Also, confirmed that this is fixed for me after upgrading. Thanks.

Add Comment

Modify Ticket

Action
as closed The owner will remain nuald.
The resolution will be deleted. Next status will be 'reopened'.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.