Skip to content

Resolve nested includes relative to their template - #984

Open
OskarEichler wants to merge 1 commit into
slim-template:mainfrom
OskarEichler:codex/nested-relative-includes
Open

OskarEichler wants to merge 1 commit into
slim-template:mainfrom
OskarEichler:codex/nested-relative-includes

Conversation

@OskarEichler

Copy link
Copy Markdown

Summary

  • resolve each nested relative include from the directory of the template that contains it
  • restore the previous include context after successful or failed recursive compilation
  • document nested relative-path behavior

The current filter always uses the root template's file option, so a template in nested/parent.slim cannot include its sibling with include sibling when include_dirs is relative.

Verification

  • focused four-level nested/sibling include and exception-cleanup model on Ruby 4.0.6 and 3.2.11
  • existing core/plugin suite: 415 runs, 650 assertions on each Ruby
  • Rails 8.1.3.1: 15 runs, 36 assertions on each Ruby
  • Sinatra 4.2.1: 10 runs, 21 assertions on each Ruby
  • syntax, package surface and diff checks pass

No test files are changed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant