-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Add tests for :manpage: inside a title
#11705
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
Merged
picnixz
merged 11 commits into
sphinx-doc:master
from
picnixz:fix/11673-manpage-in-headings
Feb 14, 2024
Merged
Changes from 2 commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
aba5f15
allow ``:manpage:`` inside a title
picnixz 931e7e1
Fix lint.
picnixz 452f883
Merge branch 'master' into fix/11673-manpage-in-headings
picnixz adfb485
Merge branch 'master' into fix/11673-manpage-in-headings
picnixz 22cb908
Merge remote-tracking branch 'upstream/master' into fix/11673-manpage…
picnixz fdb7948
apply suggestions
picnixz 9b53e1b
fix lint
picnixz a6891dc
only add tests since it now works
picnixz 791e44d
Merge branch 'master' into fix/11673-manpage-in-headings
picnixz c46fc05
Merge branch 'master' into fix/11673-manpage-in-headings
picnixz 47a290f
Merge branch 'master' into fix/11673-manpage-in-headings
picnixz File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,5 @@ | ||
| * :manpage:`man(1)` | ||
| * :manpage:`ls.1` | ||
| * :manpage:`sphinx` | ||
| The :manpage:`cp(1)` | ||
| -------------------- | ||
| * :manpage:`man(1)` | ||
| * :manpage:`ls.1` | ||
| * :manpage:`sphinx` |
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
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.
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.
Perhaps just setting an attribute?
and then
doc.get('is_partial', False)to test.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 wanted to keep the old behaviour in case there was someone somewhere who relied on that. Also, it's to remind us that we have possible partial documents somewhere and that we always need to be aware of.
On the other hand, using an attribute may lead false positive where a user would define this specific attribute. When using the source + special name we may avoid these cases (is_partial may be a "simple" attribute name that may be used in some projects).
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'm averse to introducing new infrastructure around this if it isn't something we want to keep long-term. So I would prefer the attribute approach (keeping the document name the same), we could use
_is_partialor some mangled name if we need to.A
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.
That's fine by me then! Actually I don't know whether we'll keep it long-term or not since I don't know if we will be able to fix this issue on partial documents.
I'll do the update next week (I'me quite busy these days).