Kate syntax highlighting not working in 17.12

Tim Edwards liststuff at fastmail.com.au
Fri Jul 27 03:23:11 BST 2018


I've just tried that, but it didn't make a difference unfortunately.

Best regards
Tim

On 26/07/18 22:53, Dominik Haumann wrote:
> Try version="1" instead of "1.00". Does that work?
>
> Tim Edwards <liststuff at fastmail.com.au
> <mailto:liststuff at fastmail.com.au>> schrieb am Do., 26. Juli 2018, 07:48:
>
>     Hi,
>
>     I'm trying to use Kate to provide highlighting for headers in text
>     files
>     (ending .txt). Basically I want to be able to use 3 levels of headers:
>     ***Top level - bold and underlined***
>
>     **Mid level - bold**
>
>     *Lower Level - underlined*
>
>     The bold style works as expected, but underlining doesn't seem to work
>     in 17.12 (Kubuntu 18.04). I have the following in
>     ~/.local/share/katepart5/syntax/normaltext.xml:
>
>     <?xml version="1.0" encoding="UTF-8"?>
>     <!DOCTYPE language SYSTEM "language.dtd">
>     <!-- Syntax highlighting that I want applied to all text files -->
>     <language name="Normal Text Files with Headers" version="1.00"
>     kateversion="2.4"
>               section="Other" extensions="*.txt"
>               license="public domain" mimetype="text/plain">
>        
>       <highlighting>
>         <contexts>
>           <context name="Normal" attribute="Normal Text"
>     lineEndContext="#stay">
>             <!-- Match header lines like ***Buying Process*** -->
>             <RegExpr String="^\*\*\*\S.*" attribute="topLevelHeader" />
>             <!-- Match header lines like **January 2017** -->
>             <RegExpr String="^\*\*\S.*" attribute="secondLevelHeader" />
>             <!-- Match header lines like *Quantitative Analysis* -->
>             <RegExpr String="^\*\S.*" attribute="thirdLevelHeader" />
>           </context>
>         </contexts>
>         <itemDatas>
>           <itemData name="Normal Text" defStyleNum="dsNormal" />
>           <itemData name="topLevelHeader" defStyleNum="dsNormal"
>     bold="true"
>     underline="true" />
>           <itemData name="secondLevelHeader" defStyleNum="dsNormal"
>     bold="true" />
>           <itemData name="thirdLevelHeader" defStyleNum="dsNormal"
>     underline="true" />
>         </itemDatas>
>       </highlighting>
>     </language>
>
>     Anything I need to add or change in the XML above to have it work? I
>     think the underlining was working with Kubuntu 16.04. Could the
>     difference be something to do with the change to KSyntaxHighlighting
>     Framework?
>
>     Best regards
>     Tim
>     p, li { white-space: pre-wrap; }normaltext.xml
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kwrite-devel/attachments/20180727/148e44cc/attachment-0001.html>


More information about the KWrite-Devel mailing list