logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

Markdent::Role::BalancedEvent - A parameterized role for events which can check if they balance another

Author

       Dave Rolsky <autarch@urth.org>

Bugs

       See Markdent for bug reporting details.

       Bugs may be submitted at <https://github.com/houseabsolute/Markdent/issues>.

       I am also usually active on IRC as 'autarch' on "irc://irc.perl.org".

Description

       This role provides behavior for start and end events which can be checked for a balancing event. This
       includes things like strong, emphasis, and code start/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.

Name

       Markdent::Role::BalancedEvent - A parameterized role for events which can check if they balance another
       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.

Source

       The source code repository for Markdent can be found at <https://github.com/houseabsolute/Markdent>.

Version

       version 0.40

See Also