D22253: Improve the Fortran fixed format syntax highlighting

Nibaldo González noreply at phabricator.kde.org
Thu Jul 4 09:16:14 BST 2019


nibags added a comment.


  Now I checked the patch well and I want to add some final recommendations before merging.
  I think it's okay.

INLINE COMMENTS

> fortran-fixed.xml:368
>        <context attribute="Normal Text" lineEndContext="#stay" name="default" >
>          <IncludeRules context="find_strings" />
>          <IncludeRules context="find_decls" />

I recommend moving lines 374 and 375 (`<IncludeRules context="find_preprocessor" />` and `<IncludeRules context="find_comments" />`) to the beginning of the "default" context so that they have higher priority. For example, when writing a number on column 72, it's not highlighted as a comment, because numbers have a higher priority.

> fortran-fixed.xml:411
> +        <DetectChar attribute="Comment" context="comment" char="!"/>
> +        <RegExpr attribute="Comment" context="comment" String=".*" column="72" />
>        </context>

Here put `String="."` instead of `".*"`, because this also highlights alerts in the comment line (for example: TODO, NOTE, ALERT).

REPOSITORY
  R216 Syntax Highlighting

REVISION DETAIL
  https://phabricator.kde.org/D22253

To: nononux
Cc: nibags, kwrite-devel, kde-frameworks-devel, LeGast00n, domson, michaelh, ngraham, bruns, demsking, cullmann, sars, dhaumann
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kwrite-devel/attachments/20190704/34f3999e/attachment.html>


More information about the KWrite-Devel mailing list