cortav  Check-in [5898f6833b]

Overview
Comment:aaaagh remove debugging code
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 5898f6833b90c9f3fbc85fdb1e331293d2f49c5cd07e143cb341e8d999de9ea3
User & Date: lexi on 2021-12-22 10:20:42
Other Links: manifest | tags
Context
2021-12-22
10:23
fix bugged makefile check-in: 36024a43c5 user: lexi tags: trunk
10:20
aaaagh remove debugging code check-in: 5898f6833b user: lexi tags: trunk
10:19
disable backtraces check-in: 2af5c4085a user: lexi tags: trunk
Changes

Modified cortav.lua from [e7bf814ce9] to [eb3cc08f95].

284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
...
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399

ct.ext.job = declare {
	ident = 'ext-job';
	init = {
		states = {};
	};
	construct = function(me,name,doc,pred,...)
		print('constructing job',name,'for',doc)
		-- prepare contexts for relevant extensions
		me.name = name
		me.doc = doc -- for reqs + limiting
		for _, ext in pairs(ct.ext.loaded) do
			if pred == nil or pred(ext) then
				me.states[ext] = {}
			end
................................................................................
		end;
		hook = function(me, hook, ...)
			-- used when extensions may need to persist state across
			-- multiple functions or invocations
			local ret = {}
			local hook_id = me.name ..'_'.. hook
			for hookfn, ext, state in me:each('hook', hook_id) do
				print(' - running hook for ext',ext.id)
				table.insert(ret, (hookfn(me:delegate(ext),...)))
			end
			return ret
		end;
	};
}








<







 







<







284
285
286
287
288
289
290

291
292
293
294
295
296
297
...
384
385
386
387
388
389
390

391
392
393
394
395
396
397

ct.ext.job = declare {
	ident = 'ext-job';
	init = {
		states = {};
	};
	construct = function(me,name,doc,pred,...)

		-- prepare contexts for relevant extensions
		me.name = name
		me.doc = doc -- for reqs + limiting
		for _, ext in pairs(ct.ext.loaded) do
			if pred == nil or pred(ext) then
				me.states[ext] = {}
			end
................................................................................
		end;
		hook = function(me, hook, ...)
			-- used when extensions may need to persist state across
			-- multiple functions or invocations
			local ret = {}
			local hook_id = me.name ..'_'.. hook
			for hookfn, ext, state in me:each('hook', hook_id) do

				table.insert(ret, (hookfn(me:delegate(ext),...)))
			end
			return ret
		end;
	};
}

Modified ext/toc.lua from [706a61f3d9] to [1a479a26d4].

31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
...
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
	id = 'toc';
	desc = 'provides a table of contents for HTML renderer plus generic fallback';
	version = ss.version {0,1; 'devel'};
	contributors = {{name='lexi hale', handle='velartrill', mail='lexi@hale.su', homepage='https://hale.su'}};
	default = true; -- on unless inhibited
	hook = {
		doc_init = function(job)
			print('initing doc:toc',job.doc)
			job.state.toc_custom_position = false
		end;

		render_html_init = function(job, render)
			render.stylesets.toc = css_toc
			render.stylesets.tocFixed = css_toc_fixed
		end;
................................................................................
									attrs = {href = '#' .. l.id};
									nodes = {sr.htmlSpan(l.label, l.block, sec)};
								}
								table.insert(n.nodes, {tag = 'li', attrs = {}, nodes={nn}})
							end
							table.insert(ent.nodes, n)
						end
            print(ss.dump(ent))
					end
				end
				return lst
			end;

			[true] = function() end; -- fallback // convert to different node types
		};
	};
}







<







 







<









31
32
33
34
35
36
37

38
39
40
41
42
43
44
...
167
168
169
170
171
172
173

174
175
176
177
178
179
180
181
182
	id = 'toc';
	desc = 'provides a table of contents for HTML renderer plus generic fallback';
	version = ss.version {0,1; 'devel'};
	contributors = {{name='lexi hale', handle='velartrill', mail='lexi@hale.su', homepage='https://hale.su'}};
	default = true; -- on unless inhibited
	hook = {
		doc_init = function(job)

			job.state.toc_custom_position = false
		end;

		render_html_init = function(job, render)
			render.stylesets.toc = css_toc
			render.stylesets.tocFixed = css_toc_fixed
		end;
................................................................................
									attrs = {href = '#' .. l.id};
									nodes = {sr.htmlSpan(l.label, l.block, sec)};
								}
								table.insert(n.nodes, {tag = 'li', attrs = {}, nodes={nn}})
							end
							table.insert(ent.nodes, n)
						end

					end
				end
				return lst
			end;

			[true] = function() end; -- fallback // convert to different node types
		};
	};
}