public Method

BlueCloth.apply_span_transforms( str, rs )

Apply Markdown span transforms to a copy of the specified str with the given render state rs and return it.

Source Code

# File bluecloth.rb, line 261
def apply_span_transforms( str, rs )
        @log.debug "Applying span transforms to:\n  %p" % str

        str = transform_code_spans( str, rs )
        str = encode_html( str )
        str = transform_images( str, rs )
        str = transform_anchors( str, rs )
        str = transform_italic_and_bold( str, rs )

        # Hard breaks
        str.gsub!( / {2,}\n/, "<br#{EmptyElementSuffix}\n" )

        @log.debug "Done with span transforms:\n  %p" % str
        return str
end
Comments

Have your say
Please use Textile formatting (click here for a cheat sheet). Use <code/> and <pre/> for code samples.
Click here to login with OpenID to to post comments.