NAME

Markdent::Role::BalancedEvent - A parameterized role for end events which can check if the match a start event

DESCRIPTION

This role provides behavior for end events which can be checked for a matching start event. This includes things like strong, emphasis, code, and html tag events, all of which can be compared to a start event.

ROLE PARAMETERS

This role accepts the following parameters:

  • compare => [ ... ]

    This should be a list of attribute names which will be compared between the start and end events.

METHODS

This role provides the following methods:

$event->balances_event($event2)

Given an event, this returns true if two events balance each other. This is done by comparing types (StartCode matches EndCode), as well as the attributes provided in the compare parameter.

BUGS

See Markdent for bug reporting details.

AUTHOR

Dave Rolsky, <autarch@urth.org>

COPYRIGHT & LICENSE

Copyright 2009 Dave Rolsky, All Rights Reserved.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.