{#- Small markup helpers shared by the pages. -#}
{#- A fixed-in list such as "1.24.13, 1.26.0-rc.3": one no-wrap span per version, so the list breaks only at its
commas and never inside a version (at a hyphen or mid-word). -#}
{% macro versions(text) -%}
{%- for version in (text or "").split(",") %}{{ version.strip() }}{{ ", " if not loop.last }}{% endfor -%}
{%- endmacro %}
{#- The factors of a risk score as chips, " +"; only the factors that add points are listed. -#}
{% macro factor_chips(factors) -%}
{%- for f in factors if f.points %}
- {{ f.detail }} +{{ f.points }}
{%- endfor %}
{%- endmacro %}
{#- A score you can open to see what it is made of. -#}
{% macro risk_score(score, factors) -%}
{{ score }}
{{ factor_chips(factors) }}
{%- endmacro %}