Differences From
Artifact [f6f6b80f21]:
976 976
977 977 local insert_caption = blockwrap(function(l,c,j,d)
978 978 if next(d) == nil then
979 979 c:fail 'subtitle in an unlabeled section is meaningless'
980 980 end
981 981
982 982 local last = d[#d]
983 + -- make the syntax a bit friendlier in edge cases
984 + if last.kind == 'reference' then last = last.rsrc end
985 +
983 986 local me = {
984 987 kind = 'subtitle';
985 988 spans = ct.parse_span(l:sub(3):gsub("^%s+",""), c);
986 989 }
987 990
988 991 local captionable = {
989 992 quote=true, aside=true,