Skip to content

Conversation

@Jos512
Copy link
Contributor

@Jos512 Jos512 commented Jan 14, 2019

I noticed that, when a highlighted C# snippet ends with a comment, that comment is not recognised. This is caused by the lexer requiring a end of line (\n) after a comment.

While that works fine for regular program code, when we highlight code snippets that are part of a bigger program, a comment at the end often helps to put thing into perspective. (And so should be recognised.)

This pull request does:

  • Add comment highlight in the C# lexer for when the code ends with a comment.
  • Update the C# test data with a comment in the end.
  • Update the expected test data.

Before

(blue = comment)

before-example

After this pull request

after-example


Let me know if something can be done better or prefer a different way.

Thanks for your consideration. 🙂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant