Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#6662 closed defect (fixed)

Syntax highlighting is not longer working for C#

Reported by: Ryan J Ollos Owned by: Alexander Slesarev
Priority: normal Component: CodeExampleMacro
Severity: normal Keywords:
Cc: Trac Release: 0.11


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].

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 Ryan J Ollos 7 years ago.

Download all attachments as: .zip

Change History (7)

Changed 7 years ago by Ryan J Ollos

comment:1 Changed 7 years ago by Alexander Slesarev

Status: newassigned

comment:2 Changed 7 years ago by Alexander Slesarev

Resolution: fixed
Status: assignedclosed

Fixed in r7635.

comment:3 Changed 7 years ago by Ryan J Ollos

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 7 years ago by Ryan J Ollos

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 7 years ago by Ryan J Ollos

!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 7 years ago by Ryan J Ollos

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

Modify Ticket

Change Properties
Set your email in Preferences
as closed The owner will remain Alexander Slesarev.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment

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

Note: See TracTickets for help on using tickets.