@core_helper
def markdown_extract(text, extract_length=190):
 if (not text):
  return ''
 plain = RE_MD_HTML_TAGS.sub('', markdown(text))
 if ((not extract_length) or (len(plain) < extract_length)):
  return literal(plain)
 return literal(unicode(whtext.truncate(plain, length=extract_length, indicator='...', whole_word=True)))

@ core_helper def markdown_extract ( text , extract_length = 190 ) : if ( not text ) : return '' plain = RE_MD_HTML_TAGS . sub ( '' , markdown ( text ) ) if ( ( not extract_length ) or ( len ( plain ) < extract_length ) ) : return literal ( plain ) return literal ( unicode ( whtext . truncate ( plain , length = extract_length , indicator = '...' , whole_word = True ) ) )
return the plain text representation of markdown encoded text .