alecthomas/chroma

C lexer treats #define as a comment

carlynorama opened this issue · 0 comments

Is there an existing issue for this?

  • I have searched the existing issues

Describe the bug

The C lexer treats #define as a comment in (Looks like C++ does as well), at least the style appears the same.

maybe adding it around line 14?

    <analyse first="true" >
      <regex pattern="(?m)^\s*#include &lt;" score="0.1" />
      <regex pattern="(?m)^\s*#ifn?def " score="0.1" />
    </analyse>

ETA - nope, those are comments, too!

It's fine if they don't get special treatment, but it's rough that they can fade into the comments.

Thank you!

To Reproduce

Reproduced Here

same for include and if