vendor/gems/BlueCloth-1.0.0/lib/bluecloth.rb
### Transform Markdown-style codeblocks in a copy of the specified +str+ and
### return it.
Transform Markdown-style codeblocks in a copy of the specified +str+ and
return it.
Transform Markdown - style codeblocks in a copy of the specified + str + and return it .
def transform_code_blocks( str, rs )
		@log.debug " Transforming code blocks"
		str.gsub( CodeBlockRegexp ) {|block|
			codeblock = $1
			remainder = $2
			%{\n\n<pre><code>%s\n</code></pre>\n\n%s} %
				[ encode_code( outdent(codeblock), rs ).rstrip, remainder ]
		}
	end
def transform_code_blocks ( str , rs ) @log . debug " Transforming code blocks" str . gsub ( CodeBlockRegexp ) { | block | codeblock = $1 remainder = $2 %{\n\n<pre><code>%s\n</code></pre>\n\n%s} % [ encode_code ( outdent ( codeblock ) , rs ) . rstrip , remainder ] } end
Transform Markdown-style codeblocks in a copy of the specified +str+ and
return it.
Transform Markdown - style codeblocks in a copy of the specified + str + and return it .
# Generate the codeblock
str
<not_specific>
rs
<not_specific>