codemirror / CodeMirror-v1

An editable-iframe based code editor in JavaScript. See https://github.com/marijnh/CodeMirror for the currently maintained version
http://codemirror.net/
Other
362 stars 63 forks source link

C# parser problem with verbatim string #44

Closed dricks closed 13 years ago

dricks commented 13 years ago

Hi,

it seems that the C# parser can't deal with verbatim strings. It tries to indent new lines into the verbatim string (which add spaces in it) and does not recognize those new lines as part of the string (wrong colors). Also, next lines does not have a good indent because of this error.

Sample :

public decimal CalculateSalary(int grade)
{
    string str=@"verbatim test
      seems to fail";

      if (grade > 10)
      return 1000;
    return 500;
  }

Could you check if it can be fixed ?

marijnh commented 13 years ago

This was fixed in 218319e68310bdab35be39669c2c4f9365490b02 (thanks to Boris Gaber)