{%- comment -%}
Usage: {% include bugify.html content=text %},
where content is a string that contains a bug reference name and id.
e.g. Bootstrap#19984
{%- endcomment -%}
{%- assign words = include.content | split: " " -%}
{%- for word in words -%}
{% if word contains "#" %}
{% if word contains "," %}{% assign separator = true %}{% else %}{% assign separator = false %}{% endif %}
{%- assign data = word | split: "#" -%}
{%- assign bug_cat = data[0] | strip_newlines -%}
{%- assign bug_id = data[1] | strip_newlines | remove: "," -%}
{%- case bug_cat -%}
{%- when "Bootstrap" -%}
#{{ bug_id }}
{%- when "Edge" -%}
Edge issue #{{ bug_id }}
{%- when "A11yUserVoice" -%}
Microsoft A11y UserVoice idea #{{ bug_id }}
{%- when "UserVoice" -%}
Edge UserVoice idea #{{ bug_id }}
{%- when "Mozilla" -%}
Mozilla bug #{{ bug_id }}
{%- when "Chromium" -%}
Chromium issue #{{ bug_id }}
{%- when "WebKit" -%}
WebKit bug #{{ bug_id }}
{%- when "Safari" -%}
Apple Safari Radar #{{ bug_id }}
{%- when "Normalize" -%}
Normalize #{{ bug_id }}
{%- else -%}
parse error
{%- endcase -%}{% if separator %}, {% endif %}
{% else %}
{{ word }}
{%- endif -%}
{%- endfor -%}