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

\include and Python #10076

Closed
couet opened this issue May 23, 2023 · 10 comments
Closed

\include and Python #10076

couet opened this issue May 23, 2023 · 10 comments

Comments

@couet
Copy link
Contributor

couet commented May 23, 2023

Describe the bug
In the ROOT reference guide (build with Doxygen) we are using \include to show the code of tutorials.
Some are in C++ some are in Python. The highlighting looks nice for C++ but does not work very well with
some Python examples we have. Like the one mentioned here:
root-project/root#12851

Expected behavior
The correct highlight of Python code.

Screenshots
See root-project/root#12851

Version
1.9.5

@albert-github
Copy link
Collaborator

I can see in the string literals some problems but which other problems do you see?
The source and output from the project mentioned is a moving target so:

  • Can you please attach a, small, self contained example (source+configuration file in a, compressed, tar or zip file) that allows us to reproduce the problem? Please don't add external links as they might not be persistent.

albert-github added a commit to albert-github/doxygen that referenced this issue May 23, 2023
In general the source browser for python code showed some strange effects in case of a number of spaces at the beginning of a line inside a triple quoted block.
Instead of staying inside the triple quoted block a jump was done to the outside of the block as  the general rule `<*>[ \t]+` was executed (and a jump to condition `Body` occurred) instead  of the a handling inside the triple quoted block.
@albert-github
Copy link
Collaborator

For the string literal problem I've just pushed a proposed patch, pull request #10077

doxygen added a commit that referenced this issue May 23, 2023
@couet
Copy link
Contributor Author

couet commented May 24, 2023

Yes, the problem is with the string literal. I will test your patch. Thanks

@couet
Copy link
Contributor Author

couet commented May 24, 2023

By the way, I have a question about \include: How does it decide which language is the file included / with the file name extension?

@albert-github albert-github added the fixed but not released Bug is fixed in github, but still needs to make its way to an official release label May 24, 2023
@albert-github
Copy link
Collaborator

Code has been integrated in master on GitHub (please don't close the issue as this will be done at the moment of an official release).

@albert-github
Copy link
Collaborator

Regarding the questing about the \include (#10076 (comment)) this is done in the same way as "normal" files i.e. based on the extension.

@couet
Copy link
Contributor Author

couet commented May 24, 2023

Maybe it can be mentioned here: https://www.doxygen.nl/manual/commands.html#cmdinclude ?

@albert-github
Copy link
Collaborator

Is an idea, but should in that case also be added to other commands like \snippet, \example, ...

@doxygen
Copy link
Owner

doxygen commented Aug 25, 2023

This issue was previously marked 'fixed but not released',
which means it should be fixed in doxygen version 1.9.8.
Please verify if this is indeed the case. Reopen the
issue if you think it is not fixed and please include any additional information
that you think can be relevant (preferably in the form of a self-contained example).

@doxygen doxygen removed the fixed but not released Bug is fixed in github, but still needs to make its way to an official release label Aug 25, 2023
@doxygen doxygen closed this as completed Aug 25, 2023
@couet
Copy link
Contributor Author

couet commented Aug 25, 2023

It is fixed in 1.9.8. Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants
@doxygen @couet @albert-github and others