dlang-tour / core

D Language online tour (https://tour.dlang.org/) and online editor (https://run.dlang.io/)
Boost Software License 1.0
120 stars 48 forks source link

Wrong syntax highlight / indentation for nestable multi line comments #761

Open Geod24 opened 4 years ago

Geod24 commented 4 years ago
// Single line
/* Multi
Line
Comment
*/
/+ Nestabled
/+
Multi
/+
Line
+/ Comment +/ +/
    void main () {}

Looks like the issue is present on Github as well... So I guess it's @jacob-carlborg 's territory ?

Screen Shot 2020-10-30 at 14 50 27
jacob-carlborg commented 4 years ago

I can reproduce it in TextMate as well. I created an issue in the D bundle repository: https://github.com/textmate/d.tmbundle/issues/20. I'll take a look when I have some time.

jacob-carlborg commented 4 years ago

Fixed in the TextMate bundle: https://github.com/textmate/d.tmbundle/issues/20. I don't know how the procedure for updating the bundle used by GitHub works.

wilzbach commented 4 years ago

Fixed in the TextMate bundle: textmate/d.tmbundle#20. I don't know how the procedure for updating the bundle used by GitHub works.

https://github.com/github/linguist/blob/master/CONTRIBUTING.md#fixing-syntax-highlighting https://github.com/github/linguist/tree/master/vendor

Last update was in June though: https://github.com/github/linguist/pull/4881

wilzbach commented 4 years ago

BTW the tour uses CodeMirror (https://github.com/dlang-tour/core/tree/master/public/static/lib/codemirror). See also: https://github.com/codemirror/CodeMirror/tree/master/mode/d

Geod24 commented 4 years ago

Regarding Github, we might be lucky: https://github.com/github/linguist/pull/5084 :)

lildude commented 4 years ago

Regarding Github, we might be lucky: github/linguist#5084 :)

You definitely will be. 😁

This is the change from the grammar that will be pulled in in this next Linguist release which looks to include the changes in https://github.com/textmate/d.tmbundle/issues/20

Geod24 commented 4 years ago

Oops, we broke something 💥

/++
 Someone's having a bad time
+/
void myFunction () {}
Geod24 commented 4 years ago

Triggers here: https://github.com/ldc-developers/phobos/blob/f3020fae38144e40c26f477595cf37473a0adfa3/std/datetime/systime.d#L4735-L4755

jacob-carlborg commented 4 years ago

Oops, we broke something 💥

My bad, should be fixed in: https://github.com/textmate/d.tmbundle/commit/e031d03ce0c2fe0f9e064dad1faf670a19bde482.