strip_hashes(text)
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