Bug 367821

Summary: wineHQ syntax: The section in a reg file isn't highlighted correctly
Product: [Applications] kate Reporter: Joerg Schiermeier <kde-bug>
Component: syntaxAssignee: KWrite Developers <kwrite-bugs-null>
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version First Reported In: 3.14.2   
Target Milestone: ---   
Platform: Debian unstable   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: Patch: Show sections in reg files correctly.

Description Joerg Schiermeier 2016-08-25 21:47:49 UTC
Opening an reg file from wine (user.reg, system.reg or userdef.reg) didn't show the section in "[ ... ]" correctly.



Reproducible: Always

Steps to Reproduce:
0. This is for wine standard installation
1. check if wine is installed
2. run wineboot -fu to create the WINEPREFIX
3. open the file "user.reg in ~/.wine

Actual Results:  
[Control Panel\\Desktop] 1471827642
#time=1d1fc109b094db0
"ActiveWndTrackTimeout"=dword:00000000
"BlockSendInputResets"="0"


Expected Results:  
"[Control Panel\\Desktop]" should be in bold letters.

How to solve this:

---------- winehq.xml ----------
 1	<?xml version="1.0" encoding="UTF-8"?>
 2	<!DOCTYPE language SYSTEM "language.dtd">
 3	<language name="WINE Config" version="1.03" kateversion="2.4" section="Configuration" extensions="*.reg" mimetype="">
 4	  <highlighting>
 5	    <contexts>
 6	      <context attribute="Normal Text" lineEndContext="#stay" name="Normal">
 7	        <RegExpr String="WINE REGISTRY Version.*$" attribute="RegistryBeginEnd" context="#stay" />
 8	        <RegExpr String="#\s*&lt;\s*wineconf\s*&gt;" attribute="RegistryBeginEnd" context="#stay" column="0"/>
 9	        <RegExpr String="#\s*&lt;\s*\/\s*wineconf\s*&gt;" attribute="RegistryBeginEnd" context="#stay" column="0"/>
10	        <RegExpr String="\[.*\]$" attribute="Section" context="#stay" column="0"/>
11	        <RegExpr String=";.*$" attribute="Comment" context="#stay"/>
---------- /winehq.xml ----------

Simply remove the Dollar sign as the line end indicator (RegEx) in winehq.xml in line 10.
Comment 1 Joerg Schiermeier 2016-08-25 21:54:01 UTC
Created attachment 100765 [details]
Patch: Show sections in reg files correctly.
Comment 2 Christoph Cullmann 2016-09-05 12:43:59 UTC
Git commit d80d054fafaf719730c6933b17825b41715120e5 by Christoph Cullmann, on behalf of Joerg Schiermeier.
Committed on 05/09/2016 at 12:43.
Pushed by cullmann into branch 'master'.

Bug 367821 - wineHQ syntax: The section in a reg file isn't highlighted correctly

M  +2    -2    src/syntax/data/winehq.xml

http://commits.kde.org/ktexteditor/d80d054fafaf719730c6933b17825b41715120e5