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

Support for Numeric code fence directives - GitHub flavor #11210

Open
AdarshRawat1 opened this issue Oct 29, 2024 · 7 comments
Open

Support for Numeric code fence directives - GitHub flavor #11210

AdarshRawat1 opened this issue Oct 29, 2024 · 7 comments
Labels
enhancement a request to enhance doxygen, not a bug fixed but not released Bug is fixed in github, but still needs to make its way to an official release has pull request

Comments

@AdarshRawat1
Copy link

AdarshRawat1 commented Oct 29, 2024

Describe

I'm working on P4 compiler documentation and I noticed that when Doxygen comes across code snippets like -

  • image

It will remove the P from P4 and display the 4 with the code in HTML output like this -

  • image

Screenshots

I tried adding space and lowercase, but I couldn't get it to hide the P4 from the output.
image

Expected behavior

Is there a way to hide this unknown directive, i.e. P4 from output. All the above mentioned ways render correctly on GitHub.
p.s. I'm not asking for the support of P4 language in Doxygen, but I want to hide the directive from the output.

Additional context

I added random characters (Alphabets Only) for directives, and it was not visible in the output [Expected Behavior]. So, I think the issue is due to the number 4.

Version

1.12.0

Zip File

Code_snippets.zip

@AdarshRawat1 AdarshRawat1 changed the title [Query] Support for unknown code fence directives - GitHub flavor [Query] Support for Numeric code fence directives - GitHub flavor Oct 29, 2024
@albert-github
Copy link
Collaborator

Did you try one of:

```.p4
```{p4}
```{.p4}

@albert-github albert-github added needinfo reported bug is incomplete, please add additional info enhancement a request to enhance doxygen, not a bug labels Oct 29, 2024
@albert-github
Copy link
Collaborator

at the moment only [A-Za-z] characters are allowed when not using curly brackets, probably numbers should be added as well

@albert-github albert-github changed the title [Query] Support for Numeric code fence directives - GitHub flavor Support for Numeric code fence directives - GitHub flavor Oct 31, 2024
albert-github added a commit to albert-github/doxygen that referenced this issue Oct 31, 2024
…b flavor

- support for numerical character in language name
- adjusted documentation to make it more clear
- stripped initial `.` in language name, as otherwise fenced code blocks with e.g. `.dot` or `.plantuml` don't work.
@albert-github albert-github added has pull request and removed needinfo reported bug is incomplete, please add additional info labels Oct 31, 2024
@albert-github
Copy link
Collaborator

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

doxygen added a commit that referenced this issue Oct 31, 2024
issue #11210 Support for Numeric code fence directives - GitHub flavor
@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 Nov 1, 2024
@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).

@AdarshRawat1
Copy link
Author

Did you try one of:

```.p4

This one renders correctly on github but in doxygen same issue
image

{p4} & .p4}

Not rendering on Github

@AdarshRawat1
Copy link
Author

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).

Thank you @albert-github for the patch 🙌.

@albert-github
Copy link
Collaborator

Is it correct that you answered the question / remarks from my comments in sequence and that with the patch the problems are gone?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement a request to enhance doxygen, not a bug fixed but not released Bug is fixed in github, but still needs to make its way to an official release has pull request
Projects
None yet
Development

No branches or pull requests

2 participants