Add support for custom format blocks
Merged Custom Formatter support (9c1362228e9e04cb00ba3ad71ef2c54aa524fc35) from aioi/master