aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Otto <[email protected]>2014-12-04 21:20:54 -0800
committerMark Otto <[email protected]>2014-12-04 21:20:54 -0800
commit8454382b6af89434b5cc0ce58efa955b649d904d (patch)
treeadc13a0ccb653945f0f43ea468313a7edff70f27
parent156750941b013f700c7338a81184c58b6fd7e9f0 (diff)
parentfc9b7e5464cddef1f0d75d25b09103299194592a (diff)
downloadbootstrap-8454382b6af89434b5cc0ce58efa955b649d904d.tar.xz
bootstrap-8454382b6af89434b5cc0ce58efa955b649d904d.zip
Merge branch 'v4' of https://github.com/twbs/derpstrap into v4
-rw-r--r--docs/_plugins/highlight_alt.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/docs/_plugins/highlight_alt.rb b/docs/_plugins/highlight_alt.rb
index de84e759d..9d1b414bb 100644
--- a/docs/_plugins/highlight_alt.rb
+++ b/docs/_plugins/highlight_alt.rb
@@ -8,7 +8,7 @@ module Jekyll
# forms: name, name=value, or name="<quoted list>"
#
# <quoted list> is a space-separated list of numbers
- SYNTAX = /^([a-zA-Z0-9.+#-]+)((\s+\w+(=(\w+|"([0-9]+\s)*[0-9]+"))?)*)$/
+ SYNTAX = /^([a-zA-Z0-9.+#-]+)((\s+\w+(=((\w|[0-9_-])+|"([0-9]+\s)*[0-9]+"))?)*)$/
def initialize(tag_name, markup, tokens)
super
@@ -17,7 +17,7 @@ module Jekyll
@options = {}
if defined?($2) && $2 != ''
# Split along 3 possible forms -- key="<quoted list>", key=value, or key
- $2.scan(/(?:\w="[^"]*"|\w=\w|\w)+/) do |opt|
+ $2.scan(/(?:\w+(?:=(?:(?:\w|[0-9_-])+|"[^"]*")?)?)/) do |opt|
key, value = opt.split('=')
# If a quoted list, convert to array
if value && value.include?("\"")
@@ -55,7 +55,7 @@ eos
end
def example(output)
- "<div class=\"bs-example\">#{output}</div>"
+ "<div class=\"bs-example\" data-example-id=\"#{@options[:id]}\">\n#{output}\n</div>"
end
def render_rouge(code)