aboutsummaryrefslogtreecommitdiff
path: root/docs/_plugins
diff options
context:
space:
mode:
authorThomas McDonald <[email protected]>2015-04-24 22:21:12 +0100
committerThomas McDonald <[email protected]>2015-04-24 22:21:12 +0100
commit58c208ec73837925f63a5cd63f1766502a565d84 (patch)
tree425b9d1fee5bd944e52e8e7e7c8a9d731aaf7afe /docs/_plugins
parent4c3c402b0ec9295ac4630d3583e592a21264582e (diff)
downloadbootstrap-58c208ec73837925f63a5cd63f1766502a565d84.tar.xz
bootstrap-58c208ec73837925f63a5cd63f1766502a565d84.zip
re-work callout tag conditional
Output a warning if the type is not supported and default to info
Diffstat (limited to 'docs/_plugins')
-rw-r--r--docs/_plugins/callout.rb11
1 files changed, 5 insertions, 6 deletions
diff --git a/docs/_plugins/callout.rb b/docs/_plugins/callout.rb
index 29ecbc99d..536ca588e 100644
--- a/docs/_plugins/callout.rb
+++ b/docs/_plugins/callout.rb
@@ -6,12 +6,11 @@ module Jekyll
def initialize(tag_name, type, tokens)
super
- @type = type
- if type == "danger"
- @type = "danger"
- elsif type == "warning"
- @type = "warning"
- elsif type == "info"
+ type.strip!
+ if %w(info danger warning).include?(type)
+ @type = type
+ else
+ puts "#{type} callout not supported. Defaulting to info"
@type = "info"
end
end