pub-dev icon indicating copy to clipboard operation
pub-dev copied to clipboard

Dart code shows wrong color within markdown

Open Sunbreak opened this issue 4 years ago • 3 comments

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

Sunbreak avatar Feb 20 '21 09:02 Sunbreak

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?

isoos avatar Feb 20 '21 10:02 isoos

CC @mit-mit and @devoncarew

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

kevmoo avatar Feb 20 '21 17:02 kevmoo

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.

sigurdm avatar Feb 01 '24 13:02 sigurdm