📝 Fix out-of-range highlight in advanced settings docs by patrickwehbe · Pull Request #15811 · fastapi/fastapi · GitHub
Skip to content

📝 Fix out-of-range highlight in advanced settings docs#15811

Open
patrickwehbe wants to merge 1 commit into
fastapi:masterfrom
patrickwehbe:fix-settings-config-highlight
Open

📝 Fix out-of-range highlight in advanced settings docs#15811
patrickwehbe wants to merge 1 commit into
fastapi:masterfrom
patrickwehbe:fix-settings-config-highlight

Conversation

@patrickwehbe

Copy link
Copy Markdown

In docs/en/docs/advanced/settings.md, the config file embed uses hl[10]:

{* ../../docs_src/settings/app02_an_py310/config.py hl[10] *}

But docs_src/settings/app02_an_py310/config.py is only 7 lines long, so hl[10] highlights a line that does not exist.

This looks like a leftover from the earlier app01 example, where line 10 was settings = Settings(). The prose right below the embed confirms there is no such line here:

Notice that now we don't create a default instance settings = Settings().

This PR removes the hl[10] so nothing out of range is highlighted.

The config.py embed used hl[10] but the file is only 7 lines long, so it
highlighted a non-existent line. It was a leftover from the app01 example
where line 10 was `settings = Settings()`. The prose just below confirms it:
"Notice that now we don't create a default instance `settings = Settings()`."
@github-actions github-actions Bot added the docs Documentation about how to use FastAPI label Jun 20, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Documentation about how to use FastAPI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant