# -*- coding: iso-8859-1 -*-
"""
    MoinMoin - Thumbnail Macro
    Version 0.1

    [[Clear(left)]]
    [[Clear(right)]]
    [[Clear]]
    Avoids floating content to the left, right or both of the content following.

    @copyright: 2007 by Kenneth Bull
    @license: GNU GPL, see COPYING for details.

"""

def execute(macro, args):
    args = (args or '').strip().lower();
    return macro.formatter.div(1, style='clear:%s;' % (args if args in ['left', 'right'] else 'both'))+ \
           macro.formatter.div(0)

