def build_abstract(info, example=None, detailed_info={}):
 abstract = ''
 if info:
  abstract += ('<p>%s</p>' % info.replace('\n', '\\n'))
 if example:
  abstract += ('<pre><code>%s</code></pre>' % example.replace('\n', '\\n'))
 for (key, value) in detailed_info.items():
  abstract += ('<span class="prog__sub">%s</span><p>%s</p>' % (key, value))
 abstract = ('<section class="prog__container">%s</section>' % abstract.replace('\n', '\\n'))
 return abstract

def build_abstract ( info , example = None , detailed_info = { } ) : abstract = '' if info : abstract += ( '<p>%s</p>' % info . replace ( '\n' , '\\n' ) ) if example : abstract += ( '<pre><code>%s</code></pre>' % example . replace ( '\n' , '\\n' ) ) for ( key , value ) in detailed_info . items ( ) : abstract += ( '<span class="prog__sub">%s</span><p>%s</p>' % ( key , value ) ) abstract = ( '<section class="prog__container">%s</section>' % abstract . replace ( '\n' , '\\n' ) ) return abstract
constructs the abstract of an entry according to the new fathead html template elements .