Skip to content

Fix indentation in ConditionalKeyBindings documentation example - #2168

Open
Doomguy-BFG9000 wants to merge 1 commit into
prompt-toolkit:mainfrom
Doomguy-BFG9000:docs/conditional-keybindings-indent-1938
Open

Doomguy-BFG9000 wants to merge 1 commit into
prompt-toolkit:mainfrom
Doomguy-BFG9000:docs/conditional-keybindings-indent-1938

Conversation

@Doomguy-BFG9000

Copy link
Copy Markdown

Fix the extra indentation in the ConditionalKeyBindings documentation example so the bindings assignment is at module scope, alongside the function definition. Copying the existing snippet raises IndentationError.

Fixes #1938.

Validation: the exact documented snippet fails to compile before the change, then compiles and executes with the documented imports and an existing key-binding collection after it. The Sphinx HTML build succeeds before and after with the same three existing Windows autodoc warnings. The rendered example was inspected at 1400px and 800px widths.

The unmodified Windows test suite has four failures (147 passed, 5 skipped); this PR changes only the example indentation.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Indentation Issue in ConditionalKeyBindings Example in Documentation

1 participant