Skip to content

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

Open
@ghost

Description

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions