2
0
mirror of https://github.com/tenrok/bootstrap.git synced 2026-05-27 14:46:01 +03:00

re-work callout tag conditional

Output a warning if the type is not supported and default to info
This commit is contained in:
Thomas McDonald
2015-04-24 22:21:12 +01:00
parent 4c3c402b0e
commit 58c208ec73
+5 -6
View File
@@ -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