Skip to content

Syntax highlighting of c++ preprocessor interprets '/*' inside string as a comment #15257

@jonner

Description

@jonner

Summary

The syntax highlighting that helix uses seems to have some issues with the character sequence '/*' within a string in C++ preprocessor symbols. It treats the character sequences as the start of a comment even though it is within a quoted string literal. When the language is set to 'c', it works, but it fails for 'cpp'.

Reproduction Steps

I tried this:

  1. download foo.cpp
  2. hx foo.cpp

I expected this to happen:

it should highlight the int foo(); line as a function

Instead, this happened:

the int foo(); line is highlighted as a comment

Image

Helix log

No response

Platform

Linux

Terminal Emulator

ptyxis

Installation Method

fedora package

Helix Version

helix 25.07.1 (a05c151)

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: This is a bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions