Convert tabs to spaces in place and return self if any were converted.
Source Code
# File bluecloth.rb, line 224 def detab!( tabwidth=TabWidth ) newstr = self.split( /\n/ ).collect {|line| line.gsub( /(.*?)\t/ ) do $1 + ' ' * (tabwidth - $1.length % tabwidth) end }.join("\n") self.replace( newstr ) end
<code/>and<pre/>for code samples.