mirror of
https://github.com/twbs/bootstrap.git
synced 2025-01-17 09:52:29 +01:00
example plugin: add data-example-id
only if it's been supplied. (#24127)
This commit is contained in:
parent
1d6a6c2abf
commit
6dd3d91768
@ -34,7 +34,7 @@ Syntax Error in tag 'example' while parsing the following markup:
|
||||
|
||||
#{markup}
|
||||
|
||||
Valid syntax: example <lang>
|
||||
Valid syntax: example <lang> [id=foo]
|
||||
eos
|
||||
end
|
||||
end
|
||||
@ -55,7 +55,7 @@ eos
|
||||
end
|
||||
|
||||
def example(output)
|
||||
"<div class=\"bd-example\" data-example-id=\"#{@options[:id]}\">\n#{output}\n</div>"
|
||||
"<div class=\"bd-example\"" + (@options[:id] ? " data-example-id=\"#{@options[:id]}\"" : "") + ">\n#{output}\n</div>"
|
||||
end
|
||||
|
||||
def remove_holderjs(code)
|
||||
|
Loading…
x
Reference in New Issue
Block a user