summaryrefslogtreecommitdiffstats
path: root/POLICY-SDK-APP/src/main/webapp/app/policyApp/CSS/bootstrap/docs/_plugins/bugify.rb
diff options
context:
space:
mode:
Diffstat (limited to 'POLICY-SDK-APP/src/main/webapp/app/policyApp/CSS/bootstrap/docs/_plugins/bugify.rb')
-rw-r--r--POLICY-SDK-APP/src/main/webapp/app/policyApp/CSS/bootstrap/docs/_plugins/bugify.rb25
1 files changed, 25 insertions, 0 deletions
diff --git a/POLICY-SDK-APP/src/main/webapp/app/policyApp/CSS/bootstrap/docs/_plugins/bugify.rb b/POLICY-SDK-APP/src/main/webapp/app/policyApp/CSS/bootstrap/docs/_plugins/bugify.rb
new file mode 100644
index 000000000..3cee9e43f
--- /dev/null
+++ b/POLICY-SDK-APP/src/main/webapp/app/policyApp/CSS/bootstrap/docs/_plugins/bugify.rb
@@ -0,0 +1,25 @@
+module Jekyll
+ module BugFilter
+ def bugify(input)
+ upstream_map = {
+ "Bootstrap" => "https://github.com/twbs/bootstrap/issues/",
+ "IE" => ["https://connect.microsoft.com/IE/feedback/details/", "IE bug"],
+ "Mozilla" => ["https://bugzilla.mozilla.org/show_bug.cgi?id=", "Mozilla bug"],
+ "Chromium" => ["https://code.google.com/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) \ No newline at end of file