rjbs / Pod-Weaver

recombine pod documents into awesomer pod documents
26 stars 28 forks source link

Create attribute `nested_commands` in Collect #46

Open andrewalker opened 7 years ago

andrewalker commented 7 years ago

Allow user to define which commands to nest together with the collected command.

This would enable one to include commands that weren't included there (for example =begin, which this patch also adds by default now), without having to patch the module.

This has the same motivation as #45, which I suppose could also be extended to use an attribute like this.

Besides, it's now possible to configure it like this:

[Collect / ATTRIBUTES]
command        = attr
header_command = head2
new_command    = head3
; head3 is now excluded from nested_commands
nested_commands = head4
nested_commands = over
nested_commands = back
nested_commands = begin
nested_commands = end
nested_commands = for

Since it's a bit confusing to be able to set new_command to head3 if it would nest the following head3's together.

stevan commented 7 years ago

👍