cortav  Check-in [6c198bdce0]

Overview
Comment:many fixes and updates to kate syntax
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 6c198bdce03741956d8d4b461a1fbf084a385b0b589adce91a0590fda9dc4a56
User & Date: lexi on 2022-09-09 01:12:24
Other Links: manifest | tags
Context
2022-09-09
01:39
update docs check-in: 7b6c406de4 user: lexi tags: trunk
01:12
many fixes and updates to kate syntax check-in: 6c198bdce0 user: lexi tags: trunk
2022-09-08
23:37
progress on resources + block macros; fix toc bug; add uri, fetch scaffolding, and b64e to sirsem check-in: 3ee2195d4f user: lexi tags: trunk
Changes

Modified cortav.lua from [cd83b5f5a6] to [3b9ae546e1].

1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
				kind = 'inline-rsrc';
				rsrc = rsrc;
				indent = nil;
				depth = 0;
			}
		end
	end};
	{seq='&$', fn=blockwrap(function(s,c)
		local id, args = s:match('^&$([^%s]+)%s?(.-)$')
		if id == nil or id == '' then
			c:fail 'malformed macro block'
		end
		local argv = ss.str.split(c.doc.enc, args, c.doc.enc.encodeUCS'|', {esc=true})
		return {
			kind = 'macro';
			macro = id;







|
|







1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
				kind = 'inline-rsrc';
				rsrc = rsrc;
				indent = nil;
				depth = 0;
			}
		end
	end};
	{seq='$', fn=blockwrap(function(s,c)
		local id, args = s:match('^%$([^%s]+)%s?(.-)$')
		if id == nil or id == '' then
			c:fail 'malformed macro block'
		end
		local argv = ss.str.split(c.doc.enc, args, c.doc.enc.encodeUCS'|', {esc=true})
		return {
			kind = 'macro';
			macro = id;

Modified desk/cortav.xml from [bda20d41cd] to [bf85cd3996].

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
..
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
...
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130

131
132
133
134
135
136
137
...
144
145
146
147
148
149
150










151
152
153
154
155
156
157
...
174
175
176
177
178
179
180

181
182
183
184
185
186
187
				<RegExpr String='\\.' attribute='Escaped Char'/>
				<RegExpr attribute='Section Cue' context='sec-ident' String='(#|ยง)+' firstNonSpace='true' />
				<StringDetect String='~~~' attribute='Literal Block Cue' firstNonSpace='true' context='literal-block-cue'/>
				<RegExpr attribute='List' String='[\*:]+' firstNonSpace='true' context='text' />
				<Detect2Chars char='%' char1='%' attribute='Comment' context='comment'/>
				<Detect2Chars char='%' char1='!' attribute='Critical Directive Cue' context='directive'/>
				<DetectChar char='%' attribute='Directive Cue' context='directive'/>
				<DetectChar char='@' attribute='Resource Cue' context='resource'/>



				<DetectChar char='&#9;' attribute='Normal Text' context='refdef-id'/>





			</context>

			<context name='comment' attribute='Comment' lineEndContext='#pop'>
			</context>
			<context name='error' attribute='Error' lineEndContext='#pop'>
			</context>

			<context name='resource' attribute='Resource Identifier' lineEndContext='#pop'>
				<DetectSpaces context='#pop!error' attribute='Error'/>






			</context>

			<context name='sec-ident' attribute='Identifier' lineEndContext='#pop'>
				<DetectSpaces context='#pop!sec' attribute='Normal Text'/>
			</context>

			<context name='sec' attribute='Header' lineEndContext='#pop'>
................................................................................
				<DetectChar attribute='Macro Delimiter' context='macro' char='{'/>
			</context>

			<context name='span' attribute='Styled Text' lineEndContext='#pop'>
				<IncludeRules context='text'/>
				<DetectChar attribute='Span Delimiter' context='#pop' char=']'/>
			</context>












			<context name='macro' attribute='Macro' lineEndContext='#pop'>
				<DetectSpaces context='#pop!macro-body'/>
				<DetectChar attribute='Macro Delimiter' char='}' context='#pop'/>
			</context>

			<context name='macro-body' attribute='Styled Text' lineEndContext='#pop'>
				<RegExpr String='\\.' attribute='Escaped Char'/>
				<DetectChar attribute='Field Delimiter' char='|'/>
				<DetectChar attribute='Macro Delimiter' char='}' context='#pop'/>




				<IncludeRules context='span'/>














			</context>

			<context name='span-emph' attribute='Emphatic Text' lineEndContext='#pop'>
				<IncludeRules context='span'/>
			</context>

			<context name='span-strong' attribute='Strong Text' lineEndContext='#pop'>
................................................................................

			<context name='span-del' attribute='Deleted Text' lineEndContext='#pop'>
				<IncludeRules context='span'/>
			</context>

			<context name='span-cue' attribute='Span Cue' lineEndContext='#pop' fallthroughContext="error">
				<StringDetect attribute='Span Cue' String='`\' context='#pop!flat-span' />
				<StringDetect attribute='Span Cue' String='\\' context='#pop!flat-span' />

				<DetectChar   attribute='Span Cue' char='!' context='#pop!span-emph' />
				<DetectChar   attribute='Span Cue' char='*' context='#pop!span-strong' />
				<DetectChar   attribute='Span Cue' char='~' context='#pop!span-del' />

				<AnyChar      attribute='Span Cue' String='`$+๐Ÿ”’' context='#pop!span' />
				<StringDetect attribute='Span Cue' String='โ†’' context='#pop!ref' />
				<StringDetect attribute='Span Cue' String='๐Ÿ”—' context='#pop!ref' />
				<DetectChar   attribute='Span Cue' char='>' context='#pop!ref' />
				<DetectChar   attribute='Span Cue' char='^' context='#pop!ref' />
				<DetectChar   attribute='Span Cue' char='"' context='#pop!ref' />
				<DetectChar   attribute='Span Cue' char='&amp;' context='#pop!ref' />
				<DetectChar   attribute='Span Cue' char='#' context='#pop!var-ref' />
				<DetectChar   attribute='Span Cue' char='\' context='#pop!flat-span' />

				<Detect2Chars attribute='Comment' char='%' char1='%' context='#pop!inline-comment' />
				<Detect2Chars attribute='Critical Directive Cue' char='%' char1='!' context='#pop!inline-directive' />
				<DetectChar   attribute='Directive Cue' char='%' context='#pop!inline-directive' />
			</context>

			<context name='flat-span' attribute='Unstyled Text' lineEndContext='#pop'>
				<DetectChar attribute='Unstyled Text' context='flat-span' char='['/>
................................................................................
			</context>

			<context name='inline-directive' attribute='Directive' lineEndContext='#pop'>
				<IncludeRules context='flat-span'/>
				<AnyChar String=".:!#$%@~'&quot;" attribute='Directive Cue'/>
				<DetectSpaces context='#pop!span'/>
			</context>











			<context name='ref' attribute='Reference' lineEndContext='#pop'>
				<IncludeRules context='flat-span'/>
				<DetectSpaces context='#pop!span'/>
			</context>

			<context name='var-ref' attribute='Reference' lineEndContext='#pop'>
................................................................................
			<itemData name='Normal Text' defStyleNum='dsNormal'/>
			<itemData name='Styled Text' defStyleNum='dsNormal'/>
			<itemData name='Emphatic Text' defStyleNum='dsNormal' italic='true'/>
			<itemData name='Strong Text' defStyleNum='dsNormal' bold='true'/>
			<itemData name='Deleted Text' defStyleNum='dsNormal' strikeOut='true'/>
				
			<itemData name='Section Cue' defStyleNum='dsKeyword' bold='true'/>

			<itemData name='Header' defStyleNum='dsControlFlow' underline='true'/>
			<itemData name='Identifier' defStyleNum='dsVariable'/>

			<itemData name='Unstyled Text' defStyleNum='dsVerbatimString'/>
			<itemData name='Escaped Char' defStyleNum='dsSpecialChar'/>
			<itemData name='Reference' defStyleNum='dsControlFlow' underline='true'/>
			<itemData name='Span Cue' defStyleNum='dsKeyword' bold='true'/>







|
>
>
>
|
>
>
>
>
>







|
|
>
>
>
>
>
>







 







>
>
>
>
>
>
>
>
>
>
>







|


>
>
>
>
|
>
>
>
>
>
>
>
>
>
>
>
>
>
>







 







|










<



>







 







>
>
>
>
>
>
>
>
>
>







 







>







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
..
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
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
...
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169

170
171
172
173
174
175
176
177
178
179
180
...
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
...
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
				<RegExpr String='\\.' attribute='Escaped Char'/>
				<RegExpr attribute='Section Cue' context='sec-ident' String='(#|ยง)+' firstNonSpace='true' />
				<StringDetect String='~~~' attribute='Literal Block Cue' firstNonSpace='true' context='literal-block-cue'/>
				<RegExpr attribute='List' String='[\*:]+' firstNonSpace='true' context='text' />
				<Detect2Chars char='%' char1='%' attribute='Comment' context='comment'/>
				<Detect2Chars char='%' char1='!' attribute='Critical Directive Cue' context='directive'/>
				<DetectChar char='%' attribute='Directive Cue' context='directive'/>
				<DetectChar char='@' attribute='Resource Cue' context='resource-ident'/>
				<DetectChar char='$' attribute='Deref Cue' context='block-macro-ident'/>
				<DetectChar char='&amp;' attribute='Deref Cue' context='block-deref-ident'/>
				<Detect2Chars char='&#9;' char1='&#9;' context='refdef'/>
				<DetectChar char='&#9;' context='refdef-id'/>

				<Detect2Chars char='|' char1=':' attribute="Section Cue" context='#pop!table' />
				<Detect2Chars char='+' char1=':' attribute="Section Cue" context='#pop!table' />
				<AnyChar String='|+' attribute="Section Cue" context='#pop!table' />
				<DetectSpaces context="#pop!init"/>
			</context>

			<context name='comment' attribute='Comment' lineEndContext='#pop'>
			</context>
			<context name='error' attribute='Error' lineEndContext='#pop'>
			</context>

			<context name='resource-ident' attribute='Resource Identifier' lineEndContext='#pop'>
				<DetectSpaces context='#pop!resource-line'/>
			</context>
			<context name='resource-line' attribute='Identifier' lineEndContext='#pop'>
				<RegExpr String='\{$' attribute="Span Cue" context='#pop!resource-inline'/>
			</context>
			<context name='resource-inline' attribute='Literal Block' lineEndContext='#pop!resource-inline'>
				<RegExpr String='^}$' attribute="Span Cue" context='#pop'/>
			</context>

			<context name='sec-ident' attribute='Identifier' lineEndContext='#pop'>
				<DetectSpaces context='#pop!sec' attribute='Normal Text'/>
			</context>

			<context name='sec' attribute='Header' lineEndContext='#pop'>
................................................................................
				<DetectChar attribute='Macro Delimiter' context='macro' char='{'/>
			</context>

			<context name='span' attribute='Styled Text' lineEndContext='#pop'>
				<IncludeRules context='text'/>
				<DetectChar attribute='Span Delimiter' context='#pop' char=']'/>
			</context>

			<context name='table' attribute='Normal Text' lineEndContext='#pop'>
				<IncludeRules context='text'/>
				<StringDetect attribute='Section Cue' String=':|:'/>
				<StringDetect attribute='Section Cue' String=':+:'/>
				<Detect2Chars attribute='Section Cue' char=':' char1='|'/>
				<Detect2Chars attribute='Section Cue' char=':' char1='+'/>
				<Detect2Chars attribute='Section Cue' char='|' char1=':'/>
				<Detect2Chars attribute='Section Cue' char='+' char1=':'/>
				<AnyChar attribute='Section Cue' String='|+'/>
			</context>

			<context name='macro' attribute='Macro' lineEndContext='#pop'>
				<DetectSpaces context='#pop!macro-body'/>
				<DetectChar attribute='Macro Delimiter' char='}' context='#pop'/>
			</context>

			<context name='macro-body' attribute='Styled Text' lineEndContext='#pop'>
				<IncludeRules context='text'/>
				<DetectChar attribute='Field Delimiter' char='|'/>
				<DetectChar attribute='Macro Delimiter' char='}' context='#pop'/>
			</context>

			<context name='block-macro-ident' attribute='Macro' lineEndContext='#pop'>
				<DetectSpaces context='#pop!block-macro'/>
				<IncludeRules context='text'/>
			</context>

			<context name='block-macro' attribute='Styled Text' lineEndContext='#pop'>
				<RegExpr String='\\.' attribute='Escaped Char'/>
				<DetectChar attribute='Field Delimiter' char='|'/>
				<IncludeRules context='text'/>
			</context>

			<context name='block-deref-ident' attribute='Identifier' lineEndContext='#pop'>
				<DetectSpaces context='#pop!block-deref'/>
			</context>

			<context name='block-deref' attribute='Styled Text' lineEndContext='#pop'>
				<IncludeRules context='text'/>
			</context>

			<context name='span-emph' attribute='Emphatic Text' lineEndContext='#pop'>
				<IncludeRules context='span'/>
			</context>

			<context name='span-strong' attribute='Strong Text' lineEndContext='#pop'>
................................................................................

			<context name='span-del' attribute='Deleted Text' lineEndContext='#pop'>
				<IncludeRules context='span'/>
			</context>

			<context name='span-cue' attribute='Span Cue' lineEndContext='#pop' fallthroughContext="error">
				<StringDetect attribute='Span Cue' String='`\' context='#pop!flat-span' />
				<StringDetect attribute='Span Cue' String='"' context='#pop!flat-span' />

				<DetectChar   attribute='Span Cue' char='!' context='#pop!span-emph' />
				<DetectChar   attribute='Span Cue' char='*' context='#pop!span-strong' />
				<DetectChar   attribute='Span Cue' char='~' context='#pop!span-del' />

				<AnyChar      attribute='Span Cue' String='`$+๐Ÿ”’' context='#pop!span' />
				<StringDetect attribute='Span Cue' String='โ†’' context='#pop!ref' />
				<StringDetect attribute='Span Cue' String='๐Ÿ”—' context='#pop!ref' />
				<DetectChar   attribute='Span Cue' char='>' context='#pop!ref' />
				<DetectChar   attribute='Span Cue' char='^' context='#pop!ref' />

				<DetectChar   attribute='Span Cue' char='&amp;' context='#pop!ref' />
				<DetectChar   attribute='Span Cue' char='#' context='#pop!var-ref' />
				<DetectChar   attribute='Span Cue' char='\' context='#pop!flat-span' />
				<DetectChar   attribute='Span Cue' char='=' context='#pop!inline-math' />
				<Detect2Chars attribute='Comment' char='%' char1='%' context='#pop!inline-comment' />
				<Detect2Chars attribute='Critical Directive Cue' char='%' char1='!' context='#pop!inline-directive' />
				<DetectChar   attribute='Directive Cue' char='%' context='#pop!inline-directive' />
			</context>

			<context name='flat-span' attribute='Unstyled Text' lineEndContext='#pop'>
				<DetectChar attribute='Unstyled Text' context='flat-span' char='['/>
................................................................................
			</context>

			<context name='inline-directive' attribute='Directive' lineEndContext='#pop'>
				<IncludeRules context='flat-span'/>
				<AnyChar String=".:!#$%@~'&quot;" attribute='Directive Cue'/>
				<DetectSpaces context='#pop!span'/>
			</context>

			<context name='inline-math' attribute='Emphatic Text' lineEndContext='#pop'>
				<RegExpr String="\b[\d.,]+" attribute="Literal Block"/>
				<RegExpr String="\b0x[a-fA-F\d.,]+" attribute="Literal Block"/>
				<RegExpr String="\b0o[0-7]+" attribute="Literal Block"/>
				<RegExpr String="\b\w+\(" attribute="Resource Identifier"/>
				<DetectChar char=')' attribute="Resource Identifier"/>
				<AnyChar String="+-/รท*ร—=!%^&amp;|&#172;?" attribute="Strong Text"/>
				<IncludeRules context='span'/>
			</context>

			<context name='ref' attribute='Reference' lineEndContext='#pop'>
				<IncludeRules context='flat-span'/>
				<DetectSpaces context='#pop!span'/>
			</context>

			<context name='var-ref' attribute='Reference' lineEndContext='#pop'>
................................................................................
			<itemData name='Normal Text' defStyleNum='dsNormal'/>
			<itemData name='Styled Text' defStyleNum='dsNormal'/>
			<itemData name='Emphatic Text' defStyleNum='dsNormal' italic='true'/>
			<itemData name='Strong Text' defStyleNum='dsNormal' bold='true'/>
			<itemData name='Deleted Text' defStyleNum='dsNormal' strikeOut='true'/>
				
			<itemData name='Section Cue' defStyleNum='dsKeyword' bold='true'/>
			<itemData name='Deref Cue' defStyleNum='dsKeyword' bold='true'/>
			<itemData name='Header' defStyleNum='dsControlFlow' underline='true'/>
			<itemData name='Identifier' defStyleNum='dsVariable'/>

			<itemData name='Unstyled Text' defStyleNum='dsVerbatimString'/>
			<itemData name='Escaped Char' defStyleNum='dsSpecialChar'/>
			<itemData name='Reference' defStyleNum='dsControlFlow' underline='true'/>
			<itemData name='Span Cue' defStyleNum='dsKeyword' bold='true'/>

Modified ext/toc.lua from [214c9479d0] to [38c6bac1b2].

205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
				end

            local function scandoc(doc, depth)
	            for i, sec in ipairs(doc.secorder) do
						table.insert(all, {ref = sec, depth = sec.depth + depth})
						for j, block in ipairs(sec.blocks) do
							if blockHasSubdoc(block) then
								scandoc(block.doc, depth + sec.depth-1)
							end
						end
	            end
            end

				scandoc(job.doc,0)








|







205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
				end

            local function scandoc(doc, depth)
	            for i, sec in ipairs(doc.secorder) do
						table.insert(all, {ref = sec, depth = sec.depth + depth})
						for j, block in ipairs(sec.blocks) do
							if blockHasSubdoc(block) then
								scandoc(block.doc, depth + sec.depth-10)
							end
						end
	            end
            end

				scandoc(job.doc,0)