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

More restrictive block-id character set in Doxygen >= 1.10 #10859

Closed
Tracked by #14076
coryan opened this issue May 9, 2024 · 4 comments
Closed
Tracked by #14076

More restrictive block-id character set in Doxygen >= 1.10 #10859

coryan opened this issue May 9, 2024 · 4 comments
Labels

Comments

@coryan
Copy link

coryan commented May 9, 2024

Describe the bug

Doxygen 1.9 supported

@snippet{doc} foo.cc bar-baz

With Doxygen 1.10 the -baz portion is ignored and the snippet cannot be found.

To Reproduce

doxygen-repro.tar.gz

Extract the tarball and run:

doxygen

The Dockerfile may be convenient if you don't have Doxygen 1.9 and 1.10
available. Fedora:39 ships with Doxygen 1.9, and this passes:

docker build --build-arg=VERSION=39 -f Dockerfile . -t doxy:39

while this fails:

docker build --build-arg=VERSION=40 -f Dockerfile . -t doxy:40

Expected behavior

I expected the repro to succeed with Doxygen >= 1.10.

Version

doxygen --version
1.10.0 (GIT-NOTFOUND)

Additional context

I think the change in behavior was introduced as part of:

7780d51

Specifically this:

ID [$a-z_A-Z\x80-\xFF][$a-z_A-Z0-9\x80-\xFF]*

The regular expression for ID does not accept spaces, or dashes, or a number of other characters. If this is intentional, documenting the accepted character set would be useful.

@albert-github
Copy link
Collaborator

albert-github commented May 10, 2024

In the doxygen 1.9.8 version we see that the relevant code (in this case it is still in doctokenizer.l) is:

<St_Snippet>[^\\\n]+   {
                         yyextra->token.name += yytext;
                       }
<St_Snippet>"\\"       {
                         yyextra->token.name += yytext;
                       }
<St_Snippet>(\n|"\\ilinebr")  {
                         unput_string(yytext,yyleng);
                         yyextra->token.name = yyextra->token.name.stripWhiteSpace();
                         return TK_WORD;
                       }

in other words every character except a line ending was allowed.
(and it looks like that for \snippet... commands other tan \snippet{doc} type commands it is possible).

albert-github added a commit to albert-github/doxygen that referenced this issue May 12, 2024
…n >= 1.10

Corrected block-id usage for `\snippet{doc}` conform "old" usage and usage with other `\snippet` commands (the later see doctokenizer.l).
@albert-github
Copy link
Collaborator

I've just pushed a proposed patch, pull request #10862

doxygen added a commit that referenced this issue May 14, 2024
issue #10859 More restrictive block-id character set in Doxygen >= 1.10
@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).

@doxygen doxygen added the fixed but not released Bug is fixed in github, but still needs to make its way to an official release label May 15, 2024
@doxygen
Copy link
Owner

doxygen commented May 20, 2024

This issue was previously marked 'fixed but not released',
which means it should be fixed in doxygen version 1.11.0.
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 May 20, 2024
@doxygen doxygen closed this as completed May 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants