dart-syntax-highlight
dart-syntax-highlight copied to clipboard
Tools and documentation for how Dart code is formatted
```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...
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 
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)  ##...