D22253: Improve the Fortran fixed format syntax highlighting
noreply at phabricator.kde.org
Sat Jul 6 07:30:12 BST 2019
nibags accepted this revision.
nibags added a comment.
This revision is now accepted and ready to land.
That is complicated to do, we would have to make rules for all the columns before 72 and for all the possible matchings, which is a lot of work and would make the code difficult to maintain.
I think a better solution is to add the functionality to the highlighting engine, for example, allowing a rule to be forced in a column, so that it can be applied above of any context. It can be something like this:
<RegExpr attribute="Comment" context="comment" String="." column="72" forceColumn="true" />
Another option is to allow having a set of rules that are applied above of the rest of the syntax highlighting; something like "injecting" rules. Such a feature could also be used in the PHP highlighter, instead of the generator script. For example:
<RegExpr attribute="Comment" context="comment" String="." column="72" />
I think the patch is fine like that. If there is no problem, I will land this patch (to be included in the next version of KDE Frameworks).
Any idea or improvement in the highlighting of the comment in column 72, it can be done in another diff.
I will also change the license of the file to MIT.
R216 Syntax Highlighting
fortran-fixed-format (branched from master)
To: nononux, nibags
Cc: nibags, kwrite-devel, kde-frameworks-devel, LeGast00n, domson, michaelh, ngraham, bruns, demsking, cullmann, sars, dhaumann
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the KWrite-Devel