Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Relative paths for Literalincludes in included files are resolved incorretly #1068

Open
linawolf opened this issue Sep 7, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@linawolf
Copy link
Contributor

linawolf commented Sep 7, 2024

Summary

Relative paths are resolved from the location where the file is included not from the location oft the file itself

Code snippet that reproduces the problem

I have the following directory structures:

image

They are all included in Index.rst

Now if one of the properties or examples has a literalinclude using relativ paths I would expect the following to work:

..  literalinclude:: ../_CodeSnippets/_creationOptions.php
    :language: php
    :caption: EXT:my_extension/Configuration/TCA/Overrides/tt_content.php

But have to do

..  literalinclude:: _CodeSnippets/_creationOptions.php
    :language: php
    :caption: EXT:my_extension/Configuration/TCA/Overrides/tt_content.php

Or an absolute path like


..  literalinclude:: /Types/_CodeSnippets/_creationOptions.php
    :language: php
    :caption: EXT:my_extension/Configuration/TCA/Overrides/tt_content.php

Expected output

I would expect

..  literalinclude:: ../_CodeSnippets/_creationOptions.php
    :language: php
    :caption: EXT:my_extension/Configuration/TCA/Overrides/tt_content.php

To work

@linawolf linawolf added bug Something isn't working triage labels Sep 7, 2024
@jaapio jaapio removed the triage label Sep 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants