dart-lang / pub-dev

The pub.dev website
https://pub.dev
BSD 3-Clause "New" or "Revised" License
790 stars 146 forks source link

Dart code shows wrong color within markdown #4538

Open Sunbreak opened 3 years ago

Sunbreak commented 3 years ago

Dart code after inteface shows in wrong color on https://pub.dev/packages/quick_usb

Probably issue within https://github.com/dart-lang/markdown

Screen Shot 2021-02-20 at 5 16 13 PM
isoos commented 3 years ago

We are using https://highlightjs.org/ for that, but I'm not sure if there is anybody closely following the Dart language rules there. Maybe @kevmoo or @srawlins can help out pointing to the right direction?

kevmoo commented 3 years ago

CC @mit-mit and @devoncarew

We try to keep track of our solutions here https://github.com/dart-lang/dart-syntax-highlight

sigurdm commented 9 months ago

Seems it is the word interface that throws off the syntax highlighting. interface is a "⟨BUILT_IN_IDENTIFIER⟩" in dart, it is not a keyword, and can be used as a variable-name - but is treated as a keyword by highlightjs.