Skip to content

Add the ability to modify the resource path from lua #10859

Open
@CodeSandwich

Description

@CodeSandwich

I need to dynamically load markdown files referencing resources relatively. E.g. docs/03/doc.md references docs/03/MEDIA/image.png as ![](MEDIA/image.png). If I run pandoc --resource-path=docs/03 docs/03/doc.md ..., they are found just fine, but if I load the markdown file dynamically, with pandoc.read there doesn't seem to be any way to perform pandoc.mediabag.fetch that would include docs/03 as the search path unless I declare this path with --resource-path when starting pandoc. There's the PANDOC_STATE.resource_path list, but it's read-only, modifying it has no effect.

Describe your proposed improvement and the problem it solves.

Being able to modify PANDOC_STATE.resource_path inside the filter could be the right solution.

Describe alternatives you've considered.

I'm not aware of any alternatives, this use case is simply unsupported.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions