Skip to content
GitLab
Explore
Projects
Groups
Snippets
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Bootstrap
bootstrap
Commits
b9628d06
Commit
b9628d06
authored
7 years ago
by
m5o
Committed by
XhmikosR
7 years ago
Browse files
Options
Download
Email Patches
Plain Diff
Use bugify without custom Jekyll plugin (#25334)
parent
836de9cc
3 merge requests
!28721
Hot test
,
!27561
Adds font-weight-medium to font weight classes
,
!17021
v4
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
_includes/bugify.html
+42
-0
_includes/bugify.html
_plugins/bugify.rb
+0
-27
_plugins/bugify.rb
docs/4.0/browser-bugs.md
+6
-6
docs/4.0/browser-bugs.md
with
48 additions
and
33 deletions
+48
-33
_includes/bugify.html
0 → 100644
+
42
-
0
View file @
b9628d06
{%- 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 -%}
This diff is collapsed.
Click to expand it.
_plugins/bugify.rb
deleted
100644 → 0
+
0
-
27
View file @
836de9cc
module
Jekyll
module
BugFilter
def
bugify
(
input
)
upstream_map
=
{
"Bootstrap"
=>
"https://github.com/twbs/bootstrap/issues/"
,
"Edge"
=>
[
"https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/"
,
"Edge issue"
],
"A11yUserVoice"
=>
[
"https://microsoftaccessibility.uservoice.com/forums/307429-microsoft-accessibility-feedback/suggestions/"
,
"Microsoft A11y UserVoice idea"
],
"UserVoice"
=>
[
"https://wpdev.uservoice.com/forums/257854-microsoft-edge-developer/suggestions/"
,
"Edge UserVoice idea"
],
"Mozilla"
=>
[
"https://bugzilla.mozilla.org/show_bug.cgi?id="
,
"Mozilla bug"
],
"Chromium"
=>
[
"https://bugs.chromium.org/p/chromium/issues/detail?id="
,
"Chromium issue"
],
"WebKit"
=>
[
"https://bugs.webkit.org/show_bug.cgi?id="
,
"WebKit bug"
],
"Safari"
=>
[
"https://openradar.appspot.com/"
,
"Apple Safari Radar"
],
"Normalize"
=>
[
"https://github.com/necolas/normalize.css/issues/"
,
"Normalize"
]
}
upstream_map
.
each
do
|
key
,
data
|
url
=
data
.
is_a?
(
Array
)
?
data
[
0
]
:
data
label
=
data
.
is_a?
(
Array
)
?
"
#{
data
[
1
]
}
"
:
""
input
=
input
.
gsub
(
/
#{
key
}
#(\d+)/
,
"<a href=
\"
#{
url
}
\\
1
\"
>
#{
label
}
#
\\
1</a>"
)
end
return
input
end
end
end
Liquid
::
Template
.
register_filter
(
Jekyll
::
BugFilter
)
This diff is collapsed.
Click to expand it.
docs/4.0/browser-bugs.md
+
6
-
6
View file @
b9628d06
...
@@ -28,9 +28,9 @@ See also:
...
@@ -28,9 +28,9 @@ See also:
{% for bug in site.data.browser-bugs %}
{% for bug in site.data.browser-bugs %}
<tr>
<tr>
<td>
{{ bug.browser }}
</td>
<td>
{{ bug.browser }}
</td>
<td>
{{ bug.summary | markdownify
| bugify
}}
</td>
<td>
{{ bug.summary | markdownify }}
</td>
<td>
{
{
bug.upstream_bug
| bugify }
}
</td>
<td>
{
% include bugify.html content=
bug.upstream_bug
%
}
</td>
<td>
{
{
bug.origin
| bugify }
}
</td>
<td>
{
% include bugify.html content=
bug.origin
%
}
</td>
</tr>
</tr>
{% endfor %}
{% endfor %}
</tbody>
</tbody>
...
@@ -55,9 +55,9 @@ We publicly list these "most wanted" feature requests here, in the hopes of expe
...
@@ -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 %}
{% for feat in site.data.browser-features %}
<tr>
<tr>
<td>
{{ feat.browser }}
</td>
<td>
{{ feat.browser }}
</td>
<td>
{{ feat.summary | markdownify
| bugify
}}
</td>
<td>
{{ feat.summary | markdownify }}
</td>
<td>
{
{
feat.upstream_bug
| bugify }
}
</td>
<td>
{
% include bugify.html content=
feat.upstream_bug
%
}
</td>
<td>
{
{
feat.origin
| bugify }
}
</td>
<td>
{
% include bugify.html content=
feat.origin
%
}
</td>
</tr>
</tr>
{% endfor %}
{% endfor %}
</tbody>
</tbody>
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment
Menu
Explore
Projects
Groups
Snippets