Haskell: Highlight empty comments after 'import'
ClosedPublic

Authored by xialiyao on Jan 3 2019, 12:25 PM.

Details

Summary
In the following snippet,

    import Bar ()  --

the trailing, empty comment did not get highlighted.

Diff Detail

Repository
R216 Syntax Highlighting
Branch
import-comment
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 6600
Build 6618: arc lint + arc unit
xialiyao created this revision.Jan 3 2019, 12:25 PM
Restricted Application added projects: Kate, Frameworks. · View Herald TranscriptJan 3 2019, 12:25 PM
Restricted Application added subscribers: kde-frameworks-devel, kwrite-devel. · View Herald Transcript
xialiyao requested review of this revision.Jan 3 2019, 12:25 PM

Should I add a test for it?

Yes, please add a test line in the autotest folder:
https://github.com/KDE/syntax-highlighting/blob/master/autotests/input/highlight.hs

And please also increase the version number in the language xml element.

xialiyao updated this revision to Diff 48605.Jan 3 2019, 3:42 PM

Added tests and bumped haskell.xml version

dhaumann accepted this revision.Jan 3 2019, 3:47 PM
This revision is now accepted and ready to land.Jan 3 2019, 3:47 PM
This revision was automatically updated to reflect the committed changes.

Committed, I also used some default styles, see patch below. You can find more of the available default styles since KF5 here: https://kate-editor.org/2014/03/07/kate-part-kf5-new-default-styles-for-better-color-schemes/
If you want, you can use these and post another patch :-)

Thanks a lot for the tip!