NAME

Text::AsciidocDown::Include - Include directive pre-expansion for AsciiDoc

SYNOPSIS

use Text::AsciidocDown::Include;

my $expanded = Text::AsciidocDown::Include::expand_includes($text, \%opts);

DESCRIPTION

This module handles the include::[] directive expansion for Text::AsciidocDown. It is not intended for direct use; callers should use the OO interface provided by Text::AsciidocDown.

Include pre-merge supports:

  • Local filesystem includes with absolute and relative paths

  • Selector filtering: tag, tags, and lines

  • Recursion depth control

  • Policy-based error handling for missing files, cycles, and selector issues (error, keep, drop)

  • Restriction to a base directory for security

INTERFACE

expand_includes

my $expanded = Text::AsciidocDown::Include::expand_includes($text, \%opts);

Expands include::[] directives in the input text. Returns the expanded text with included file contents substituted inline.

Options:

include - HashRef controlling behavior (see "convert" in Text::AsciidocDown)
attributes - HashRef of AsciiDoc attributes
source_path - Path to the source document for relative resolution

AUTHOR

Sandor Patocs

LICENSE

Same terms as Perl itself.