aboutsummaryrefslogtreecommitdiff
path: root/docs/_plugins
diff options
context:
space:
mode:
authorMark Otto <[email protected]>2015-11-12 22:45:53 -0800
committerMark Otto <[email protected]>2015-11-12 22:45:53 -0800
commit114a2d913ee7782ea45809fee21ddcefc09c4b3d (patch)
treeee03f822a0579f2281454925a27519d27dbac8bb /docs/_plugins
parent6fd1c80d3760484ff433b616cfa51bf457a3d17f (diff)
parent1f31077122258c92bd8195450fc1cfea0e99665b (diff)
downloadbootstrap-114a2d913ee7782ea45809fee21ddcefc09c4b3d.tar.xz
bootstrap-114a2d913ee7782ea45809fee21ddcefc09c4b3d.zip
Merge pull request #17467 from Corbzilla/v4-dev-remove-holderjs-docs
V4 remove holderjs references from carousel and card docs
Diffstat (limited to 'docs/_plugins')
-rw-r--r--docs/_plugins/highlight_alt.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/docs/_plugins/highlight_alt.rb b/docs/_plugins/highlight_alt.rb
index 5b877ee36..1fc9f5d2a 100644
--- a/docs/_plugins/highlight_alt.rb
+++ b/docs/_plugins/highlight_alt.rb
@@ -57,11 +57,16 @@ eos
def example(output)
"<div class=\"bd-example\" data-example-id=\"#{@options[:id]}\">\n#{output}\n</div>"
end
+
+ def remove_holderjs(code)
+ code = code.gsub(/"holder.js.+?"/, '"..."')
+ end
def render_rouge(code)
require 'rouge'
formatter = Rouge::Formatters::HTML.new(line_numbers: @options[:linenos], wrap: false)
lexer = Rouge::Lexer.find_fancy(@lang, code) || Rouge::Lexers::PlainText
+ code = remove_holderjs(code)
code = formatter.format(lexer.lex(code))
"<div class=\"highlight\"><pre>#{code}</pre></div>"
end