highlightjs/highlight.js

(Dart) Highlight colors for Class and Constructor Calls

Open

#4,091 建立於 2024年8月13日

在 GitHub 查看
 (4 留言) (0 反應) (0 負責人)JavaScript (22,960 star) (3,497 fork)batch import
buggood first issuehelp welcomelanguage

描述

Describe the issue

The current output lacks color for class names and constructor calls so most lines are displayed in the same color, which significantly impacts readability and makes it challenging to distinguish between different code components. In contrast

Which language seems to have the issue?

Dart (the issue is impacting Flutter)

Are you using highlight or highlightAuto?

highlight

...

Sample Code to Reproduce


import 'package:flutter/material.dart';

void main() {
  runApp(MaterialApp(
    home: Scaffold (
      appBar: AppBar(
        title: const Text('Scaffold Example'),
      ),
      body: const Center(
        child: Text('Hello, World!'),
      ),
      drawer: Drawer(
        child: ListView(
          children: const <Widget>[
            ListTile(title: Text('Home')),
            ListTile(title: Text('Profile')),
          ],
        ),
      ),
      bottomNavigationBar: BottomNavigationBar(
        items: const [
          BottomNavigationBarItem(icon: Icon(Icons.home), label: 'Home'),
          BottomNavigationBarItem(icon: Icon(Icons.search), label: 'Search'),
        ],
      ),
      floatingActionButton: FloatingActionButton(
        onPressed: () {},
        child: Icon(Icons.add),
      ),
    ),
  ));
}

Expected behavior Highlight colors for Class and Constructor Calls

Additional context

Here are two images: (1) - displaying the current output from the Highlight library , where all elements appear in the same color, making it difficult to read. (2) - a different library, which shows custom colors for classes and constructors. Both images feature code written in Dart for Flutter.

highlight

other

貢獻者指南

(Dart) Highlight colors for Class and Constructor Calls · highlightjs/highlight.js#4091 | Good First Issue