From: Corbzilla Date: Thu, 3 Sep 2015 18:54:01 +0000 (+0000) Subject: removes holder.js references from example docs X-Git-Tag: v4.0.0-alpha.2~162^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1f31077122258c92bd8195450fc1cfea0e99665b;p=thirdparty%2Fbootstrap.git removes holder.js references from example docs --- diff --git a/docs/_plugins/highlight_alt.rb b/docs/_plugins/highlight_alt.rb index 5b877ee364..1fc9f5d2a8 100644 --- a/docs/_plugins/highlight_alt.rb +++ b/docs/_plugins/highlight_alt.rb @@ -57,11 +57,16 @@ eos def example(output) "
\n#{output}\n
" 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)) "
#{code}
" end