Method: RbbCode::URLTagNode#url_to_markdown
- Defined in:
- lib/rbbcode/node_extensions.rb
#url_to_markdown(options) ⇒ Object
165 166 167 168 169 170 171 172 173 |
# File 'lib/rbbcode/node_extensions.rb', line 165 def url_to_markdown() if respond_to?(:url) and respond_to?(:text) # This is a URL tag formatted like [url=http://example.com]Example[/url]. '[' + text.text_value + '](' + strip_quotes(url.text_value) + ')' else # This is a URL tag formatted like [url]http://example.com[/url]. '[' + inner_bbcode + '](' + inner_bbcode + ')' end end |