{% assign words = include.text | split: " " %}
{{ include.index }}
{%- for raw in words %} {%- assign w = raw | replace: 'th', 'th' | replace: 'Th', 'Th' | replace: 'St', 'St' | replace: 've', 've' | replace: 'Ve', 'Ve' | replace: 'dr', 'dr' | replace: 'Dr', 'Dr' %} {%- assign str = w | remove_first: '^' %} {%- if str == w %} {{ w }} {%- else -%} {%- assign word = str | remove_first: '.' | remove_first: ',' | remove_first: '!' | remove_first: '?' %} {%- if word == str %} {%- include session/say.html word=word -%} {%- else %} {%- assign punct = str | slice: -1, 1 -%} {%- include session/say.html word=word punct=punct -%} {% endif -%} {% endif -%} {% endfor -%}