Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- {%- capture list_of_scores -%}
- {{wa}}|Wine Advocate,{{bh}}|Burghound,{{ag}}|Vinous,{{jr}}|Jancis Robinson,{{jg}}|John Gilman
- {%- endcapture -%}
- {%- capture scores -%}{{wa}},{{bh}},{{ag}},{{jr}},{{jg}}{%- endcapture -%}
- {% assign scores_array = list_of_scores | split: ',' %}
- {% assign scores = list_of_scores | split: ',' %}
- {% assign highest_score = scores | first | plus: 0 %}
- {% for score_val in scores %}
- {% assign cur_score = score_val | plus: 0 %}
- {% if cur_score >= highest_score %}
- {% assign highest_score = score_val | plus: 0 %}
- {% endif %}
- {% endfor %}
- {% for score_and_name in scores_array %}
- {% assign split_score_and_name = score_and_name | split: '|' %}
- {% assign score = split_score_and_name[0] %}
- {% assign score = highest_score %}
- {% assign name = split_score_and_name[1] %}
- {% endfor %}
- <span>{{ highest_score }}</span>
- <h5>{{ name }}</h5>
Add Comment
Please, Sign In to add comment