{%- case node.type -%} {%- when 'xref' -%} {{ node.text }} {%- when 'ref' -%} {%- when 'link' -%} {{ node.text }} {%- when 'bibref' -%} [{{ node.xreftext | default: node.id }}] {%- endcase -%}