Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use bugify without custom jekyll plugin #25334

Merged
merged 3 commits into from
Mar 12, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 42 additions & 0 deletions _includes/bugify.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
{%- 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" -%}
<a href="https://github.com/twbs/bootstrap/issues/{{ bug_id }}">#{{ bug_id }}</a>
{%- when "Edge" -%}
<a href="https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/{{ bug_id }}">Edge issue #{{ bug_id }}</a>
{%- when "A11yUserVoice" -%}
<a href="https://microsoftaccessibility.uservoice.com/forums/307429-microsoft-accessibility-feedback/suggestions/{{ bug_id }}">Microsoft A11y UserVoice idea #{{ bug_id }}</a>
{%- when "UserVoice" -%}
<a href="https://wpdev.uservoice.com/forums/257854-microsoft-edge-developer/suggestions/{{ bug_id }}">Edge UserVoice idea #{{ bug_id }}</a>
{%- when "Mozilla" -%}
<a href="https://bugzilla.mozilla.org/show_bug.cgi?id={{ bug_id }}">Mozilla bug #{{ bug_id }}</a>
{%- when "Chromium" -%}
<a href="https://bugs.chromium.org/p/chromium/issues/detail?id={{ bug_id }}">Chromium issue #{{ bug_id }}</a>
{%- when "WebKit" -%}
<a href="https://bugs.webkit.org/show_bug.cgi?id={{ bug_id }}">WebKit bug #{{ bug_id }}</a>
{%- when "Safari" -%}
<a href="https://openradar.appspot.com/{{ bug_id }}">Apple Safari Radar #{{ bug_id }}</a>
{%- when "Normalize" -%}
<a href="https://github.com/necolas/normalize.css/issues/{{ bug_id }}">Normalize #{{ bug_id }}</a>
{%- else -%}
<strong>parse error</strong>
{%- endcase -%}{% if separator %}, {% endif %}

{% else %}
{{ word }}
{%- endif -%}
{%- endfor -%}
27 changes: 0 additions & 27 deletions _plugins/bugify.rb

This file was deleted.

12 changes: 6 additions & 6 deletions docs/4.0/browser-bugs.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ See also:
{% for bug in site.data.browser-bugs %}
<tr>
<td>{{ bug.browser }}</td>
<td>{{ bug.summary | markdownify | bugify }}</td>
<td>{{ bug.upstream_bug | bugify }}</td>
<td>{{ bug.origin | bugify }}</td>
<td>{{ bug.summary | markdownify }}</td>
<td>{% include bugify.html content=bug.upstream_bug %}</td>
<td>{% include bugify.html content=bug.origin %}</td>
</tr>
{% endfor %}
</tbody>
Expand All @@ -55,9 +55,9 @@ We publicly list these "most wanted" feature requests here, in the hopes of expe
{% for feat in site.data.browser-features %}
<tr>
<td>{{ feat.browser }}</td>
<td>{{ feat.summary | markdownify | bugify }}</td>
<td>{{ feat.upstream_bug | bugify }}</td>
<td>{{ feat.origin | bugify }}</td>
<td>{{ feat.summary | markdownify }}</td>
<td>{% include bugify.html content=feat.upstream_bug %}</td>
<td>{% include bugify.html content=feat.origin %}</td>
</tr>
{% endfor %}
</tbody>
Expand Down