github-linguist / linguist

Language Savant. If your repository's language is being reported incorrectly, send us a pull request!
MIT License
12.34k stars 4.27k forks source link

Objective-C highlighting broken for multiline string #2028

Closed meatcoder closed 9 years ago

meatcoder commented 9 years ago

The following snippet is highlighted such that the % in the second segment of the NSString constant is shown as a syntax error. Note that this is valid Objective-C code.

id a = @"hello there"
          "bye %@";

Adding a @ to the second segment produces the correct highlighting:

id a = @"hello there"
          @"bye %@";

This % in both snippets should be highlighted in the same way.

arfon commented 9 years ago

Hi @meatcoder - thanks for reporting this. Unfortunately this isn't something we can fix in Linguist, it's an issue with the grammar we're using: https://github.com/textmate/objective-c.tmbundle

Would you mind reporting this bug here? Once it gets fixed we can merge in the upstream fixes.

pchaigno commented 9 years ago

@meatcoder This issue was solved in textmate/objective-c.tmbundle#7. The fix will be live within a couple of weeks.