class SlackHtmlToMarkdown::Parser

Public Class Methods

to_markdown(html) click to toggle source
# File lib/slackHtmlToMarkdown.rb, line 7
def self.to_markdown(html)
  html.gsub!('<strong>', '*')
  html.gsub!('</strong>', '*')
  html.gsub!('<em>', '_')
  html.gsub!('</em>', '_')
  html.gsub!('<stike>', '~')
  html.gsub!('</strike>', '~')
  parse_link(html)
end