strip_hashes(text)
public
Strips leading # characters from text
# File lib/rdoc/text.rb, line 148
def strip_hashes text
return text if text =~ /^(?>\s*)[^\#]/
empty = ''
empty = RDoc::Encoding.change_encoding empty, text.encoding
text.gsub(/^\s*(#+)/) { $1.tr '#', ' ' }.gsub(/^\s+$/, empty)
end