Add syntax highlighting for SubRip Text (SRT) Subtitles
ClosedPublic

Authored by nibags on Sep 25 2019, 7:18 AM.

Details

Summary

Add highlighting for the classic .SRT subtitle files.

More info:
http://ale5000.altervista.org/subtitles.htm

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.Sep 25 2019, 7:18 AM
Restricted Application added projects: Kate, Frameworks. · View Herald TranscriptSep 25 2019, 7:18 AM
Restricted Application added subscribers: kde-frameworks-devel, kwrite-devel. · View Herald Transcript
nibags requested review of this revision.Sep 25 2019, 7:18 AM

There are also changes in other xml files. Are these intentional? E.g. the changes from WordDetect to RegExpr seem suspicious.

dhaumann added inline comments.Sep 25 2019, 8:47 AM
data/syntax/subrip-subtitles.xml
23

What feature do you use to require 5.53 instead of 5.0?

Sorry, that could go in another diff.
In the definition of Mustashe, I realized that using WordDetect requires a delimiter before <name. For example, writing text<table> doesn't match the WordDetect rule, so I changed it to RegExpr.

In HTML, I only put the Tags in a different context to make it simpler to include in other languages, such as Markdown and this new one.

This highlighting depends on HTML, since the tags are inserted, and HTML has kateversion 5.53

I'd indeed prefer another/separate diff. :)

nibags updated this revision to Diff 66863.Sep 26 2019, 4:15 AM
  • Undo changes in Mustache
dhaumann accepted this revision.Sep 26 2019, 5:43 AM

Thanks

This revision is now accepted and ready to land.Sep 26 2019, 5:43 AM
This revision was automatically updated to reflect the committed changes.