@LiquidTags.register('blockdiag')
def blockdiag_parser(preprocessor, tag, markup):
 m = DOT_BLOCK_RE.search(markup)
 if m:
  diagram = m.group('diagram').strip()
  code = markup
  output = diag(code, diagram)
  if output:
   return ('<span class="blockdiag" style="align: center;"><img src="data:image/png;base64,%s"></span>' % base64.b64encode(output))
 else:
  raise ValueError('Error processing input. Expected syntax: {0}'.format(SYNTAX))

@ LiquidTags . register ( 'blockdiag' ) def blockdiag_parser ( preprocessor , tag , markup ) : m = DOT_BLOCK_RE . search ( markup ) if m : diagram = m . group ( 'diagram' ) . strip ( ) code = markup output = diag ( code , diagram ) if output : return ( '<span class="blockdiag" style="align: center;"><img src="data:image/png;base64,%s"></span>' % base64 . b64encode ( output ) ) else : raise ValueError ( 'Error processing input. Expected syntax: {0}' . format ( SYNTAX ) )
blockdiag parser .