public Method

BlueCloth.strip_link_definitions( str, rs )

Strip link definitions from str, storing them in the given RenderState rs.

Source Code

# File bluecloth.rb, line 381
def strip_link_definitions( str, rs )
        str.gsub( LinkRegex ) {|match|
                id, url, title = $1, $2, $3

                rs.urls[ id.downcase ] = encode_html( url )
                unless title.nil?
                        rs.titles[ id.downcase ] = title.gsub( /"/, """ )
                end
                ""
        }
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.