code: def convert(html):
  	
  	bs = BeautifulSoup(html, 'html.parser')
  	_markdownify(bs)
  	ret = unicode(bs).replace(u'\xa0', '&nbsp;')
  	ret = re.sub(r'\n{3,}', r'\n\n', ret)
  	# ! FIXME: hack
  	ret = re.sub(r'&lt;&lt;&lt;FLOATING LINK: (.+)&gt;&gt;&gt;', r'<\1>', ret)
  	# ! FIXME: hack
  	sp = re.split(r'(&lt;&lt;&lt;BLOCKQUOTE: .*?&gt;&gt;&gt;)', ret, flags=re.DOTALL)
  	for i,e in enumerate(sp):
  		if e[:len('&lt;&lt;&lt;BLOCKQUOTE:')] == '&lt;&lt;&lt;BLOCKQUOTE:':
  			sp[i] = '> ' + e[len('&lt;&lt;&lt;BLOCKQUOTE:') : -len('&gt;&gt;&gt;')]
  			sp[i] = sp[i].replace('\n', '\n> ')
  	ret = ''.join(sp)
  	return ret.strip('\n')
docs: converts an html string to markdown while preserving unsupported markup.