dart-syntax-highlight icon indicating copy to clipboard operation
dart-syntax-highlight copied to clipboard

Tools and documentation for how Dart code is formatted

Results 5 dart-syntax-highlight issues
Sort by recently updated
recently updated
newest added

```sh % dart --version Dart SDK version: 3.3.1 (stable) (Wed Mar 6 13:09:19 2024 +0000) on "macos_arm64" ``` The following code does successfully execute, and gets highlighting, but depending on...

type-bug

This is one of the few `dart-lang` repositories still using `master` instead of `main`. It trips me up every time. There shouldn't be too many dependencies here and GitHub forwards...

This may be an issue with linguist, but I haven't had a chance to further investigate yet. You can see an example in the markdown repository here: https://github.com/dart-lang/markdown/blob/cc57a08156356d7fc8c06c73de972c58ddb39a87/lib/src/block_parser.dart#L421 ![image](https://user-images.githubusercontent.com/18372958/82974981-d9730900-9fa0-11ea-8cea-e99f14ff17fa.png)

type-bug

While investigating https://github.com/dart-lang/dart-syntax-highlight/issues/11 I found a difference in how VS Code and GitHub/linguist handle `when` in the grammars. In VS Code, when a `when` pattern stops matching, any open scopes...

**Example** ```dart /// Create a [Map] from all elements. /// /// This is a short-hand for [Map.fromEntries]. Map toMap() => Map.fromEntries(this); ``` ## On Github (as illustrated above) ![image](https://github.com/user-attachments/assets/ce71ca66-9f67-4974-bf4c-ef5e2e76fc4f) ##...