cortav  Diff

Differences From Artifact [810c155515]:

To Artifact [729b875cf0]:


   392    392   
   393    393   		local r = b.origin:ref(macroname)
   394    394   		if type(r) ~= 'string' then
   395    395   			b.origin:fail('%s is an object, not a reference', t.ref)
   396    396   		end
   397    397   		local mctx = b.origin:clone()
   398    398   		      mctx.invocation = m
   399         -		rs.renderSpans(rc, ct.parse_span(r, mctx))
          399  +
          400  +		local ir = ct.parse_span(r, mctx)
          401  +		local j = b.origin.doc.docjob
          402  +		for fn, ext, state in j:each('hook', 'doc_macro_expand_span') do
          403  +			local r = fn(j:delegate(ext), ir, b)
          404  +			if r then ir = r end
          405  +		end
          406  +		rs.renderSpans(rc, ir)
   400    407   	end
   401    408   
   402    409   	function rs.renderSpans(rc, sp, b, sec)
   403    410   		rc = rc or mkrc(b.origin)
   404    411   		for i, v in ipairs(sp) do
   405    412   			if type(v) == 'string' then
   406    413   				rc:span(v)