# File lib/puppet/util/docs.rb, line 83
 83:     def scrub(text)
 84:         # Stupid markdown
 85:         #text = text.gsub("<%=", "&lt;%=")
 86:         # For text with no carriage returns, there's nothing to do.
 87:         if text !~ /\n/
 88:             return text
 89:         end
 90:         indent = nil
 91: 
 92:         # If we can match an indentation, then just remove that same level of
 93:         # indent from every line.  However, ignore any indentation on the
 94:         # first line, since that can be inconsistent.
 95:         text = text.lstrip()
 96:         text.gsub!(/^([\t]+)/) { |s| " "*8*s.length(); } # Expand leading tabs
 97:         # Find first non-empty line after the first line:
 98:         line2start = (text =~ /(\n?\s*\n)/)
 99:         line2start += $1.length
100:         if (text[line2start..-1] =~ /^([ ]+)\S/) == 0
101:             indent = Regexp.quote($1)
102:             begin
103:                 return text.gsub(/^#{indent}/,'')
104:             rescue => detail
105:                 puts detail.backtrace
106:                 puts detail
107:             end
108:         else
109:             return text
110:         end
111: 
112:     end