cortav  Diff

Differences From Artifact [810c155515]:

To Artifact [729b875cf0]:


392
393
394
395
396
397
398







399
400
401
402
403
404
405
406

		local r = b.origin:ref(macroname)
		if type(r) ~= 'string' then
			b.origin:fail('%s is an object, not a reference', t.ref)
		end
		local mctx = b.origin:clone()
		      mctx.invocation = m







		rs.renderSpans(rc, ct.parse_span(r, mctx))
	end

	function rs.renderSpans(rc, sp, b, sec)
		rc = rc or mkrc(b.origin)
		for i, v in ipairs(sp) do
			if type(v) == 'string' then
				rc:span(v)







>
>
>
>
>
>
>
|







392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413

		local r = b.origin:ref(macroname)
		if type(r) ~= 'string' then
			b.origin:fail('%s is an object, not a reference', t.ref)
		end
		local mctx = b.origin:clone()
		      mctx.invocation = m

		local ir = ct.parse_span(r, mctx)
		local j = b.origin.doc.docjob
		for fn, ext, state in j:each('hook', 'doc_macro_expand_span') do
			local r = fn(j:delegate(ext), ir, b)
			if r then ir = r end
		end
		rs.renderSpans(rc, ir)
	end

	function rs.renderSpans(rc, sp, b, sec)
		rc = rc or mkrc(b.origin)
		for i, v in ipairs(sp) do
			if type(v) == 'string' then
				rc:span(v)