-
Notifications
You must be signed in to change notification settings - Fork 66
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
needimport path is not consistent to other directives #351
Comments
Good point. I'm totally open to change this behavior for |
This change will break the current implementation. Maybe we can check if the "old" way is used to define the location (checking if file can be found) . If old way does not lead to an existing file, use the new way (No warning). |
Wouldn't it be better to use the new way first?
|
@Chriner : You are right, that makes more sense. For clarification: .. needimport:: /my.json
--> absolute from conf.py because of starting /
--> /home/me/project/docs/my.json
.. needimport:: my.json
--> relative from current rst-file because of missing /
--> /home/me/project/docs/subfolder/my.json
* if not found, check /home/me/project/docs/my.json
* if found there, use it but throw DEPRECATION warning
* if not found, raise already implemented exception/warning |
Other directives like
image
orinclude
use relative path starting from rSt file. Looks like this is the standard.needimport
uses relative path starting from folder whereconf.py
is. This behavior is not consistent with the other directives.Hint: Change to this behavior will break existing builds. Possibly it shall be changed asap or never.
The text was updated successfully, but these errors were encountered: