dotfiles

My personal dotfiles 💠️

inline_anchor.html.haml (475B)

      1 - case @type
      2 - when :xref
      3   - refid = (attr :refid) || @target
      4   - t = @text
      5   - t ||= @document.references[:ids].fetch(refid, "[#{refid}]")
      6   %a(href="#{@target}"){:target => (atrr :window)}=t.tr_s("\n", ' ')
      7 - when :ref
      8   %a(id=@target){:target => (attr :window)}
      9 - when :bibref
     10   %a(id=@target){:target => (attr :window)}
     11     %sup
     12       = surround "[", "]" do
     13         =@target
     14 - else
     15   %a(href=@target){:id=>@id, :target=>(attr :window), :title=>(attr :title)}
     16     =@text