File: diff.xml

package info (click to toggle)
kf6-syntax-highlighting 6.18.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 49,060 kB
  • sloc: xml: 203,100; cpp: 12,878; python: 3,055; sh: 965; perl: 814; ruby: 494; pascal: 393; javascript: 161; php: 150; jsp: 132; lisp: 131; haskell: 124; ada: 119; ansic: 107; makefile: 96; f90: 94; ml: 85; cobol: 81; yacc: 71; csh: 62; exp: 61; erlang: 54; sql: 51; java: 47; sed: 45; objc: 37; tcl: 36; awk: 31; asm: 30; fortran: 18; cs: 10
file content (129 lines) | stat: -rw-r--r-- 8,215 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE language
[
  <!ENTITY file  "(====|\*\*\*|\-\-\-|diff|Only in [^:]*:).*$">
]>
<!--
    2006-08-02: 1.10 Matthew Woehlke <mw_triad@sourceforge.net>
      Added folding. Context diff changes are now identified as old/new (using
      seperate attributes). Recognize 'Only in' from 'diff -r' output.
      There is currently a bug (KATE limitation?) where regions may sometimes
      pick up one line too many.
    2008-02-13: 1.11 Eduardo Robles Elvira <edulix AT gmail DOT com>
     Fixed folding.
-->
<language name="Diff" version="9" kateversion="5.62" section="Other" extensions="*.diff;*patch;*.rej" mimetype="text/x-patch">

  <highlighting>

    <contexts>

      <context attribute="Normal Text" lineEndContext="#stay" name="Normal" fallthroughContext="AttrNormal">
        <Detect2Chars attribute="Header" context="AttrHeader_Chunk" char="@" char1="@" beginRegion="chunk" column="0"/>
        <AnyChar attribute="Header" context="AttrHeader_Chunk" String="0123456789" beginRegion="chunk" column="0"/>
        <RegExpr attribute="Header" context="RChunk" String="^\*+$" beginRegion="chunk" column="0"/>
        <RegExpr attribute="File" context="#stay" String="^Only in [^:]*:.*$" column="0"/>
        <StringDetect attribute="File" context="AttrFile_RFile" String="diff" beginRegion="chunk" column="0"/>
        <StringDetect attribute="File" context="AttrFile" String="====" column="0"/>
        <StringDetect attribute="File" context="AttrFile_File" String="***" beginRegion="chunk" column="0"/>
        <StringDetect attribute="File" context="AttrFile_File" String="---" beginRegion="chunk" column="0"/>
        <IncludeRules context="FindDiff"/>
        <DetectChar attribute="Changed line (old)" context="ChangedOld" char="!" column="0"/>
      </context>

      <context attribute="Normal Text" lineEndContext="#stay" name="FindDiff">
        <StringDetect attribute="File" context="AttrFile" String="---" column="0"/>
        <StringDetect attribute="Header" context="AttrHeader" String="+++" column="0"/>
        <AnyChar attribute="Added line" context="Added" String="+&gt;" column="0"/>
        <AnyChar attribute="Removed line" context="Removed" String="-&lt;" column="0"/>
      </context>

      <!-- block contexts -->
      <context attribute="Normal Text" lineEndContext="#stay" name="File" fallthroughContext="AttrNormal">
        <IncludeRules context="FindDiff"/>
        <Detect2Chars attribute="Header" context="AttrHeader_ChunkInFile" char="@" char1="@" beginRegion="chunk" column="0"/>
        <AnyChar attribute="Header" context="AttrHeader_ChunkInFile" String="0123456789" beginRegion="chunk" column="0"/>
        <RegExpr attribute="Header" context="RChunkInFile" String="^\*+$" beginRegion="chunk" column="0"/>
        <RegExpr attribute="File" context="#pop" String="^&file;" endRegion="chunk" column="0"/>
        <DetectChar attribute="Changed line (old)" context="ChangedOld" char="!" column="0"/>
      </context>

      <context attribute="Normal Text" lineEndContext="#stay" name="Chunk" fallthroughContext="AttrNormal">
        <IncludeRules context="FindDiff"/>
        <Detect2Chars attribute="Header" context="#pop" char="@" char1="@" endRegion="chunk" lookAhead="true" column="0"/>
        <AnyChar attribute="Header" context="#pop" String="0123456789" endRegion="chunk" lookAhead="true" column="0"/>
        <DetectChar attribute="Changed line (old)" context="ChangedOld" char="!" column="0"/>
      </context>

      <context attribute="Normal Text" lineEndContext="#stay" name="ChunkInFile" fallthroughContext="AttrNormal">
        <IncludeRules context="FindDiff"/>
        <Detect2Chars attribute="Header" context="#pop" char="@" char1="@" endRegion="chunk" lookAhead="true" column="0"/>
        <AnyChar attribute="Header" context="#pop" String="0123456789" endRegion="chunk" lookAhead="true" column="0"/>
        <StringDetect attribute="Normal Text" context="#pop!AttrNormal" String="Index:" endRegion="chunk" column="0"/>
        <RegExpr attribute="File" context="#pop" String="^&file;" endRegion="chunk" lookAhead="true" column="0"/>
        <DetectChar attribute="Changed line (old)" context="ChangedOld" char="!" column="0"/>
      </context>

      <!-- block contexts (diff -r) -->
      <context attribute="Normal Text" lineEndContext="#stay" name="RFile" fallthroughContext="AttrNormal">
        <RegExpr attribute="File" context="#pop" String="^(diff|Only in [^:]*:)" endRegion="chunk" lookAhead="true" column="0"/>
        <RegExpr attribute="Header" context="#stay" String="^&file;" column="0"/>
        <RegExpr attribute="Header" context="RChunkInFile" String="^\*+$" beginRegion="chunk" column="0"/>
        <IncludeRules context="File"/>
      </context>

      <context attribute="Normal Text" lineEndContext="#stay" name="RChunk" fallthroughContext="AttrNormal">
        <RegExpr attribute="Header" context="#stay" String="^\*\*\* .* \*\*\*\*$" column="0"/>
        <RegExpr attribute="Header" context="RChunkNew" String="^\-\-\- .* \-\-\-\-$" column="0"/>
        <IncludeRules context="Chunk"/>
      </context>

      <context attribute="Normal Text" lineEndContext="#stay" name="RChunkInFile" fallthroughContext="AttrNormal">
        <RegExpr attribute="Header" context="#stay" String="^\*\*\* .* \*\*\*\*$" column="0"/>
        <RegExpr attribute="Header" context="RChunkInFileNew" String="^\-\-\- .* \-\-\-\-$" column="0"/>
        <IncludeRules context="ChunkInFile"/>
      </context>

      <context attribute="Normal Text" lineEndContext="#stay" name="RChunkNew" fallthroughContext="AttrNormal">
        <Detect2Chars attribute="Header" context="#pop#pop" char="@" char1="@" lookAhead="true" column="0"/>
        <AnyChar attribute="Header" context="#pop#pop" String="0123456789" lookAhead="true" column="0"/>
        <DetectChar attribute="Changed line (new)" context="ChangedNew" char="!" column="0"/>
        <IncludeRules context="FindDiff"/>
      </context>

      <context attribute="Normal Text" lineEndContext="#stay" name="RChunkInFileNew" fallthroughContext="AttrNormal">
        <Detect2Chars attribute="Header" context="#pop#pop" char="@" char1="@" lookAhead="true" column="0"/>
        <AnyChar attribute="Header" context="#pop#pop" String="0123456789" lookAhead="true" column="0"/>
        <RegExpr attribute="File" context="#pop#pop" String="^&file;" endRegion="chunk" lookAhead="true" column="0"/>
        <DetectChar attribute="Changed line (new)" context="ChangedNew" char="!" column="0"/>
        <IncludeRules context="FindDiff"/>
      </context>

      <!-- line contexts -->
      <context attribute="Removed line" lineEndContext="#pop" name="Removed"/>
      <context attribute="Added line" lineEndContext="#pop" name="Added"/>
      <context attribute="Changed line (old)" lineEndContext="#pop" name="ChangedOld"/>
      <context attribute="Changed line (new)" lineEndContext="#pop" name="ChangedNew"/>

      <context attribute="Normal Text" lineEndContext="#pop" name="AttrNormal"/>
      <context attribute="File" lineEndContext="#pop" name="AttrFile"/>
      <context attribute="File" lineEndContext="#pop!File" name="AttrFile_File"/>
      <context attribute="File" lineEndContext="#pop!RFile" name="AttrFile_RFile"/>
      <context attribute="Header" lineEndContext="#pop" name="AttrHeader"/>
      <context attribute="Header" lineEndContext="#pop!Chunk" name="AttrHeader_Chunk"/>
      <context attribute="Header" lineEndContext="#pop!ChunkInFile" name="AttrHeader_ChunkInFile"/>
    </contexts>

    <itemDatas>
      <itemData name="Normal Text" defStyleNum="dsNormal" spellChecking="false"/>
      <itemData name="File"  defStyleNum="dsKeyword" spellChecking="false"/>
      <itemData name="Header"  defStyleNum="dsDataType" spellChecking="false"/>
      <itemData name="Removed line"  defStyleNum="dsString" spellChecking="false"/>
      <itemData name="Added line"  defStyleNum="dsVariable" spellChecking="false"/>
      <itemData name="Changed line (old)"  defStyleNum="dsString" spellChecking="false"/>
      <itemData name="Changed line (new)"  defStyleNum="dsVariable" spellChecking="false"/>
    </itemDatas>

  </highlighting>

</language>