sphinx-doc / sphinx-doc/sphinx
Add an option in literalinclude to skip comments in code.
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 8k
- Forks
- 2.6k
- PR merge metrics
- No merged PRs in 30d
Description
While using .. literalinclude in a document, it includes all the comments in the file. The comments include some lower-level descriptions and license.
It would be great if literalinclude provides an option to exclude comments from files.
A workaround I used was to include only the lines which don't include comments, but this is very risky. Even with a small change in the file, I have to revisit the doc and update the lines.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the implementation and tests for the literalinclude directive. Determine how an option to exclude comments should identify comments across included files, then add coverage showing that comments and license text are omitted while code remains included.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- documentation
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100