markup (Generators::MarkUp)

    # File lib/generators/templates/application/merb_stack/doc/rdoc/generators/merb_generator.rb, line 197
            def markup(str, remove_para=false)
                return '' unless str
                unless defined? @markup
                    @markup = SM::SimpleMarkup.new

                    # class names, variable names, file names, or instance variables
                    @markup.add_special(/(
                    \b([A-Z]\w*(::\w+)*[.\#]\w+)  #    A::B.meth
                    | \b([A-Z]\w+(::\w+)*)       #    A::B..
                    | \#\w+[!?=]?                #    #meth_name
                    | \b\w+([_\/\.]+\w+)+[!?=]?  #    meth_name
                    )/x, :CROSSREF)

                    # external hyperlinks
                    @markup.add_special(/((link:|https?:|mailto:|ftp:|www\.)\S+\w)/, :HYPERLINK)

                    # and links of the form  <text>[<url>]
                    @markup.add_special(/(((\{.*?\})|\b\S+?)\[\S+?\.\S+?\])/, :TIDYLINK)
                    #        @markup.add_special(/\b(\S+?\[\S+?\.\S+?\])/, :TIDYLINK)

                end
                unless defined? @html_formatter
                    @html_formatter = HyperlinkHtml.new(self.path, self)
                end

                # Convert leading comment markers to spaces, but only
                # if all non-blank lines have them

                if str =~ /^(?>\s*)[^\#]/
                    content = str
                else
                    content = str.gsub(/^\s*(#+)/)  { $1.tr('#',' ') }
                end

                res = @markup.convert(content, @html_formatter)
                if remove_para
                    res.sub!(/^<p>/, '')
                    res.sub!(/<\/p>$/, '')
                end
                res
            end