- case @type - when :xref - refid = (attr :refid) || @target a.xref href=@target =(@text || @document.references[:ids].fetch(refid, "[#{refid}]")).tr_s("\n", ' ') - when :ref a.ref id=@target - when :bibref a.bibref id=@target |[#{@target}] - else a href=@target class=role target=(attr :window) =@text