mixin sectionLink(section)
  if section
    - var href = '/diff/' + encodeURIComponent(section.path)
    a(href=href)
      | #{section.headingText}
      span.icons
        if section.whatwg
          img.icon(alt='available at HTML Standard', src='/images/whatwg.svg')
        if section.w3c
          img.icon(alt='available at HTML 5.1 Editor\'s Draft', src='/images/w3c.svg')
  else
    | None

mixin sectionLegends
  div.legends
    p Legends:
    dl
      dt
       img.icon(alt='available at HTML Standard', src='/images/whatwg.svg')
      dd
       p A section available at HTML Standard.
      dt
       img.icon(alt='available at HTML 5.1 Editor\'s Draft', src='/images/w3c.svg')
      dd
       p A section available at HTML 5.1 Editor's Draft.

mixin sectionLink(section)
  if section
    - var href = '/diff/' + section.path.split('/').map(encodeURIComponent).join('/');
    a(href=href)
      | #{section.headingText}
      span.icons
        if section.whatwg
          img.icon(alt='available at HTML Standard', src='/images/whatwg.svg')
        if section.w3c
          img.icon(alt='available at HTML 5.1 Editor\'s Draft', src='/images/w3c.svg')
  else
    | None

mixin sectionLegends
  div.legends
    p Legends:
    dl
      dt
       img.icon(alt='available at HTML Standard', src='/images/whatwg.svg')
      dd
       p A section available at HTML Standard.
      dt
       img.icon(alt='available at HTML 5.1 Editor\'s Draft', src='/images/w3c.svg')
      dd
       p A section available at HTML 5.1 Editor's Draft.

Fix encoding of section link
Fix encoding of section link
