Differences From
Artifact [06fed19c69]:
1757 1757 end
1758 1758 if v.raw then
1759 1759 return val, true
1760 1760 else
1761 1761 return ct.parse_span(val, v.origin), false
1762 1762 end
1763 1763 end
1764 +
1765 +function ct.linkspans(link)
1766 + if link.spans and next(link.spans) then return link.spans end
1767 +
1768 + local o, id, s = link.origin:ref(link.ref)
1769 + if o then --TODO
1770 + if type(o) == 'table' then
1771 + end
1772 + return {id}
1773 + else -- it's a section link
1774 + if s.heading_node then
1775 + return s.heading_node.spans
1776 + end
1777 + end
1778 +
1779 + -- give up; the renderer decides how to represent this link
1780 +end