Differences From
Artifact [f4ce452531]:
684 684 local function getSpanRenderers(procs)
685 685 local tag, elt, catenate = procs.tag, procs.elt, procs.catenate
686 686 local span_renderers = {}
687 687 local plainrdr = getBaseRenderers(tagproc.toTXT, span_renderers)
688 688 local htmlSpan = getBaseRenderers(procs, span_renderers).htmlSpan
689 689
690 690 function span_renderers.format(sp,...)
691 - local tags = { strong = 'strong', emph = 'em', strike = 'del', insert = 'ins', literal = 'code', variable = 'var'}
691 + local tags = {
692 + strong = 'strong';
693 + emph = 'em';
694 + strike = 'del';
695 + insert = 'ins';
696 + literal = 'code';
697 + variable = 'var';
698 + super = 'sup';
699 + sub = 'sub';
700 + underline = 'u';
701 + }
692 702 if sp.style == 'literal' and not opts['fossil-uv'] then
693 703 addStyle 'code'
694 704 elseif sp.style == 'strike' or sp.style == 'insert' then
695 705 addStyle 'editors_markup'
696 706 elseif sp.style == 'variable' then
697 707 addStyle 'var'
698 708 end
................................................................................
764 774 ct.parse_span(m.macro, b.origin), b,s)
765 775 local r = b.origin:ref(macroname)
766 776 if type(r) ~= 'string' then
767 777 b.origin:fail('%s is an object, not a reference', r.id)
768 778 end
769 779 local mctx = b.origin:clone()
770 780 mctx.invocation = m
771 - return htmlSpan(ct.parse_span(r, mctx),b,s)
781 + local ir = ct.parse_span(r, mctx)
782 + -- even though this happens at render time, it really shouldn't;
783 + -- we pretend this is happening as part of the document job
784 + local j = b.origin.doc.docjob
785 + for fn, ext, state in j:each('hook', 'doc_macro_expand_span') do
786 + local r = fn(j:delegate(ext), ir, b)
787 + if r then ir = r end
788 + end
789 + return htmlSpan(ir, b, s)
772 790 end
773 791 function span_renderers.math(m,b,s)
774 792 addStyle 'math'
775 793 local spans = {}
776 794 local function fmt(sp, target)
777 795 for i,v in ipairs(sp) do
778 796 if type(v) == 'string' then