{# both macro pairs must have the same signature #}

{% macro id_replace(rev, url) -%}
  <span class="revision" title="Revision {{ rev }}"><a href="{{ url }}">
  {%- if rev|length > 40 %}{{ rev[:40] }}...
  {%- else %}{{ rev }}
  {%- endif -%}  
  </a></span>
{%- endmacro %}

{% macro shorten_replace(short, rev, url) %}
  <div class="revision">
      <div class="short" title="Revision {{ rev }}">
          <a href="{{ url }}">{{ short }}...</a>
      </div> 
      <div class="full">
          <a href="{{ url }}">{{ rev }}</a>
      </div>
  </div> 
{% endmacro %}

{% macro id(rev, url) -%}
  <span class="revision" title="Revision {{ rev }}">
  {%- if rev|length > 40 %}{{ rev[:40] }}...
  {%- else %}{{ rev }}
  {%- endif -%}
  </span>
{%- endmacro %}

{% macro shorten(short, rev, url) %}
  <div class="revision">
      <div class="short" title="Revision {{ rev }}">{{ short }}...</div> 
      <div class="full">{{ rev }}</div>
  </div> 
{% endmacro %}
