public Method

BlueCloth.encode_backslash_escapes( str )

Return a copy of the given str with any backslashed special character in it replaced with MD5 placeholders.

Source Code

# File bluecloth.rb, line 439
def encode_backslash_escapes( str )
        # Make a copy with any double-escaped backslashes encoded
        text = str.gsub( /\\\\/, EscapeTable['\\'][:md5] )

        EscapeTable.each_pair {|char, esc|
                next if char == '\\'
                text.gsub!( esc[:re], esc[:md5] )
        }

        return text
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.