-
Notifications
You must be signed in to change notification settings - Fork 446
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
Fix: broken output in Documentation Code Snippets #4919
base: main
Are you sure you want to change the base?
Conversation
Note: Changes may take a few seconds to appear on GitHub Pages. Please refresh the page if you do not see the updates immediately. |
Is this ready for review? |
I was a bit occupied with university formalities, I'll complete this ASAP. |
906b7eb
to
497f527
Compare
501dfcb
to
9edb285
Compare
2a01e6c
to
333770d
Compare
Signed-off-by: Adarsh <Adarshbunny293@gmail.com>
Signed-off-by: Adarsh <Adarshbunny293@gmail.com>
Signed-off-by: Adarsh <Adarshbunny293@gmail.com>
This syntax is processed correctly by Doxygen Signed-off-by: Adarsh <Adarshbunny293@gmail.com>
333770d
to
dd0dd42
Compare
@fruffy Ready for merge ! |
@@ -68,7 +68,7 @@ To load the 'spec' file in dpdk follow the instructions in the | |||
- Currently, programs written for DPDK target should limit the functionality in Ingress blocks, in case non empty Egress blocks are present it will be ignored by default unless Hidden temporary option `--enableEgress` used. When egress block support gets added to the DPDK target, and compiler can generate separate spec file for non empty ingress and egress blocks then option `--enableEgress` will be removed. | |||
- DPDK architecture assumes the following signatures for programmable block of PSA. P4C-DPDK converts the input program to this form. | |||
|
|||
```P4 | |||
``` P4 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So I spot-checked the preview page here to see what effect this change had.
WIth this change, there is now a separate line of text that says "P4" before the block of code.
Is that intentional? Do you consider that an improvement?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @jafingerhut,
Is that intentional?
Yes
Do you consider that an improvement?
This is a temporary fix. The current version of Doxygen(1.12.0) does not support numeric code fences. So, I added a "P4" label with a gap before code blocks because, without it, only the "4" shows up in Doxygen HTML output. I thought "P4" is clearer than just "4."
I also reported this to Doxygen, and they’ve pushed a fix, which should be live in the next release. doxygen/doxygen#11210
Once the new release is available, I’ll revert this change.
@@ -114,7 +114,8 @@ P4Testgen supports the use of custom externs to restrict the breadth of possible | |||
|
|||
#### Restricted Tests | |||
`testgen_assume(expr)` will add `expr` as a necessary path constraints to all subsequent execution. For example, for the following snippet | |||
```p4 | |||
``` P4 | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same comment as my earlier one for this change. I am not planning to check all of them, but I would guess that the ones that inserted a space after ``` before P4 are probably similar to this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree, this is similar to all other P4
code block.
Recent Update to PR
I'm pushing a temporary fix for the code output renders. I'll be reaching out to the Doxygen team about the issue, and hopefully, it will be resolved in the next release.
The issue arises when we include one README file within another; in this case, the code blocks are not processed correctly.
What was done
I made a copy of broken code snippets
\internal
command. )\code{.c}
&\endcode
commands of Doxygen. Because these commands are capable of rendering the snippets correctly even when included from external Markdown.Changes
Minor fixes in documentation output.
Screenshots of Changes
Current - https://p4lang.github.io/p4c/intermediate_representation_ir.html#visitors-and-transforms
Updated
Screenshots of Broken codes for multiple Markdowns
Broken Code snippets for merged Markdown files
Fixed