fix: Typst extension logo path resolution in subdirectories (#13917) #13931
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
_extensionsor starting with..) are already input-relative and should not haveprojectOffset()appliedProblem
When using a custom Typst format extension with a logo, rendering from a subdirectory fails:
The bug was introduced in commit
533784522which addedprojectOffset()to logo paths for brand.yml support, but incorrectly applied it to all logo paths including extension-resolved ones.Solution
In
src/resources/filters/quarto-post/typst-brand-yaml.lua, detect extension-resolved paths and skip the project offset:This is the same pattern used in PR #13902 for font-paths.
Related
plans/brand-extension-path-resolution.mdfor detailed analysis of both path systemsFixes #13917
Test plan
tests/docs/smoke-all/typst/extension-logo/verifies correct path in generated.typfile🤖 Generated with Claude Code