Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

C++ syntax highlighting misses include directives with space after the octothorpe. #49

Open
ghost opened this issue May 14, 2017 · 1 comment

Comments

@ghost
Copy link

ghost commented May 14, 2017

In some C/C++ sources it is customary to indent lines containing directives like so:

#ifdef POSIX /* A comment. */
#    ifdef LINUX
#        define FOO(a, b) \
#            do { bar(a), baz(a##b); } while (0);
#    endif
#endif

It seems like the rule being used involves highlighting everything past "#" and then applying the rules for detecting comments. Also related is #41.

My apologies for not including this in #44, I only remembered it now and that already has a proposed fix.

@ghost
Copy link
Author

ghost commented May 17, 2017

I think it is also notable that the following is valid:

# /**/ ifdef POSIX
#endif

@ghost ghost mentioned this issue May 17, 2017
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

No branches or pull requests

0 participants