Fix incorrect hl[] line highlights in oauth2-scopes docs - #15854
Closed
krunal12345 wants to merge 1 commit into
Closed
Fix incorrect hl[] line highlights in oauth2-scopes docs#15854krunal12345 wants to merge 1 commit into
krunal12345 wants to merge 1 commit into
Conversation
Several code example sections referenced wrong line numbers, causing the wrong code lines to be highlighted: - "OAuth2 Security scheme": hl[63:66] started on DUMMY_HASH line and missed the scopes= dict on line 67; fixed to hl[65:68] - "JWT token with scopes": hl[157] highlighted the wrong HTTPException (bad password error); fixed to hl[159:163] (create_access_token with scope data) - "Use SecurityScopes": hl[106] was a blank line; fixed to hl[108] - "Use the scopes": hl[106,...] was blank line + incomplete exception block; fixed to hl[108:119] - "Declare scopes in path operations": hl[141] and hl[172] were blank lines; fixed to hl[143:145,173:176] - "Verify username and data shape": hl[117:129] started mid-exception block; fixed to hl[120:132] - "Verify the scopes": hl[130:136] included unrelated user-lookup lines and cut off mid-exception; fixed to hl[133:140] - Global view: updated to reflect all the above corrections
Contributor
📝 Docs previewLast commit ef418e5 at: https://cc9736dd.fastapitiangolo.pages.dev Modified Pages |
Member
|
@krunal12345, thanks for your interest. I just opened the diff between
I suggest we close this PR and report this in #15849 Thank you for understanding! |
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.

Summary
Several code example sections in docs/en/docs/advanced/security/oauth2-scopes.md had wrong line numbers in their hl[] highlight directives, causing incorrect lines (including blank lines and completely unrelated code) to be highlighted instead of the relevant code.
All line numbers were verified against the exact content of docs_src/security/tutorial005_an_py310.py.
Bugs fixed
Checklist