core icon indicating copy to clipboard operation
core copied to clipboard

Wrong syntax highlight / indentation for nestable multi line comments

Open Geod24 opened this issue 5 years ago • 9 comments

// 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

Geod24 avatar Oct 30 '20 05:10 Geod24

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 avatar Oct 30 '20 07:10 jacob-carlborg

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.

jacob-carlborg avatar Nov 03 '20 08:11 jacob-carlborg

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 avatar Nov 03 '20 11:11 wilzbach

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

wilzbach avatar Nov 03 '20 11:11 wilzbach

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

Geod24 avatar Nov 06 '20 10:11 Geod24

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

lildude avatar Nov 06 '20 10:11 lildude

Oops, we broke something 💥

/++
 Someone's having a bad time
+/
void myFunction () {}

Geod24 avatar Nov 11 '20 08:11 Geod24

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

Geod24 avatar Nov 11 '20 08:11 Geod24

Oops, we broke something 💥

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

jacob-carlborg avatar Nov 11 '20 09:11 jacob-carlborg