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

Empty outline for specific two level heading rst document with substitution definition #448

Closed
davbeek opened this issue Sep 8, 2022 · 3 comments
Labels
bug Something isn't working lsp Issues that relate to the language server

Comments

@davbeek
Copy link

davbeek commented Sep 8, 2022

The following rst document has an empty outline, with message "The active editor cannot provide outline information":

=========
Top level
=========

Second level
============

.. |pict| image:: test.png

The substitution definition |pict| is not used in the text, using it or not makes no difference for the empty outline.

Strangely enough, the following rst document does give a normal outline:

Top level
=========

Second level
------------

.. |pict| image:: test.png
@alcarney alcarney added bug Something isn't working lsp Issues that relate to the language server labels Sep 8, 2022
@alcarney
Copy link
Member

alcarney commented Sep 8, 2022

Looks like the outline code for directives needs to be able to also handle substitutions, should be easy enough to fix :)

Strangely enough, the following rst document does give a normal outline

It is strange… no idea why that it is but it seems to be related to docutils version, v0.18.1 fails in both scenarios for me, but with v0.19 i see the behaviour you describe… 🤷

@alcarney
Copy link
Member

This should now be fixed in v0.14.1 of the language server which is now available on PyPI and the conda package will hopefully be available in a few hours from now.

Feel free to re-open this if the problem persists.

@davbeek
Copy link
Author

davbeek commented Sep 13, 2022

Great, after deleting the cache and recompiling, every page with substitutions now has an outline. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working lsp Issues that relate to the language server
Projects
None yet
Development

No branches or pull requests

2 participants