mirror of
https://github.com/twbs/bootstrap.git
synced 2022-11-09 12:25:43 -05:00
re-work callout tag conditional
Output a warning if the type is not supported and default to info
This commit is contained in:
parent
4c3c402b0e
commit
58c208ec73
1 changed files with 5 additions and 6 deletions
|
@ -6,12 +6,11 @@ module Jekyll
|
||||||
|
|
||||||
def initialize(tag_name, type, tokens)
|
def initialize(tag_name, type, tokens)
|
||||||
super
|
super
|
||||||
@type = type
|
type.strip!
|
||||||
if type == "danger"
|
if %w(info danger warning).include?(type)
|
||||||
@type = "danger"
|
@type = type
|
||||||
elsif type == "warning"
|
else
|
||||||
@type = "warning"
|
puts "#{type} callout not supported. Defaulting to info"
|
||||||
elsif type == "info"
|
|
||||||
@type = "info"
|
@type = "info"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Add table
Reference in a new issue