def mungeQA(html, type, fields, model, data, col):
 for match in regexps['standard'].finditer(html):
  html = html.replace(match.group(), _imgLink(col, match.group(1), model))
 for match in regexps['expression'].finditer(html):
  html = html.replace(match.group(), _imgLink(col, (('$' + match.group(1)) + '$'), model))
 for match in regexps['math'].finditer(html):
  html = html.replace(match.group(), _imgLink(col, (('\\begin{displaymath}' + match.group(1)) + '\\end{displaymath}'), model))
 return html

def mungeQA ( html , type , fields , model , data , col ) : for match in regexps [ 'standard' ] . finditer ( html ) : html = html . replace ( match . group ( ) , _imgLink ( col , match . group ( 1 ) , model ) ) for match in regexps [ 'expression' ] . finditer ( html ) : html = html . replace ( match . group ( ) , _imgLink ( col , ( ( '$' + match . group ( 1 ) ) + '$' ) , model ) ) for match in regexps [ 'math' ] . finditer ( html ) : html = html . replace ( match . group ( ) , _imgLink ( col , ( ( '\\begin{displaymath}' + match . group ( 1 ) ) + '\\end{displaymath}' ) , model ) ) return html
convert text with embedded latex tags to image links .