Fix header parsing of documentation generator#715
Open
Conversation
* Parse the headers in a predictable order by sorting * Add a 'generictag' regex so any tag, even unknown, will stop the parsing of text to current tag, e.g. @param * Modify regex for 'method' so it also accepts a function declaration where we return Core::ERROR_UNSUPPORTED (or do other things). * gitignore __pycache__ to avoid accidentally adding those * Change @parm -> @param in IXCast.h And updated all MD documentation files with the updated generator. version:patch
Contributor
There was a problem hiding this comment.
Pull request overview
This PR improves the header parsing functionality of the documentation generator with several key enhancements. The changes ensure more predictable and reliable documentation generation.
Changes:
- Enhanced the header parser to handle unknown doxygen tags and function declarations with implementations
- Fixed ordering issues by sorting header files before processing
- Corrected a typo (@parm → @param) in IXCast.h
- Added Python bytecode directory to .gitignore
- Regenerated all markdown documentation files with the improved parser
Reviewed changes
Copilot reviewed 13 out of 14 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| tools/md_generator/h2md/header_file_parser.py | Added 'generictag' regex to handle unknown tags; improved 'method' regex to match functions with inline implementations |
| tools/md_generator/h2md/generate_md_from_header.py | Sorted header files to ensure predictable processing order |
| apis/XCast/IXCast.h | Fixed spelling typo: @parm → @param |
| .gitignore | Added pycache to prevent committing Python bytecode |
| docs/apis/*.md | Regenerated documentation files reflecting the parser improvements (ordering changes, cleaned descriptions) |
| docs/_sidebar.md | Added FirmwareDownload entry |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
And updated all MD documentation files with the updated generator.
version:patch