Prolog & Lua: fix shebang
ClosedPublic

Authored by nibags on Nov 21 2018, 8:01 PM.

Details

Summary

Before, the shebang was highlighted if there were empty lines before. Now it will only be highlighted in the first line.

Diff Detail

Repository
R216 Syntax Highlighting
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
nibags created this revision.Nov 21 2018, 8:01 PM
Restricted Application added projects: Kate, Frameworks. · View Herald TranscriptNov 21 2018, 8:01 PM
Restricted Application added subscribers: kde-frameworks-devel, kwrite-devel. · View Herald Transcript
nibags requested review of this revision.Nov 21 2018, 8:01 PM
nibags updated this revision to Diff 45991.Nov 22 2018, 4:20 AM
  • Add tests
cullmann accepted this revision.Nov 24 2018, 4:14 PM

Looks reasonable, has tests, will be applied, thanks!

This revision is now accepted and ready to land.Nov 24 2018, 4:14 PM
This revision was automatically updated to reflect the committed changes.

Btw, I think in this case the fix is correct.

But sometimes, detecting a Shebang in an extra context introduces regressions when the language is used in other xml files via IncludeRules. This seems not the case here, though, so all is fine.