-
-
Notifications
You must be signed in to change notification settings - Fork 447
Open
Labels
lexer bugHighlighting error in a lexerHighlighting error in a lexer
Description
Is there an existing issue for this?
- I have searched the existing issues
Describe the bug
PHP 8 attributes are mistakenly highlighted as comments.
Attributes are a new thing in PHP, and when they came out, most text editors were showing them as 'comments'.
This is a problem because comments are harder to see depending on the theme you've selected.
To Reproduce
Chroma playground
Chroma CLI
Input text:
<?php
namespace App\Service\Invoice\PercentageCalculation;
use Symfony\Component\DependencyInjection\Attribute\AutoconfigureTag;
// This is an ordinary comment
# This is another ordinary comment
/*
* Multiline comment
*/
#[AutoconfigureTag('app.invoice_item_percentage_calc')]
interface PercentageCalcInterface
{
public function matches(PercentageCalcRequest $req): bool;
public function handle(PercentageCalcRequest $req): int;
}Command:
chroma \
-s catppuccin-latte \
--html \
--html-lines \
--html-lines-table \
--html-inline-styles \
input.php > output.htmlMetadata
Metadata
Assignees
Labels
lexer bugHighlighting error in a lexerHighlighting error in a lexer
