Skip to content

[rejected AI] Preserve empty strings in indent(first=True) - #2265

Closed
Nikhi00718 wants to merge 1 commit into
pallets:mainfrom
Nikhi00718:codex/jinja-2176
Closed

[rejected AI] Preserve empty strings in indent(first=True)#2265
Nikhi00718 wants to merge 1 commit into
pallets:mainfrom
Nikhi00718:codex/jinja-2176

Conversation

@Nikhi00718

Copy link
Copy Markdown

Fixes #2176.

The indent filter now leaves an empty string unchanged when first=True, while preserving existing indentation behavior for non-empty and blank lines. Added a regression test covering an empty filtered block.

Tests: python -m pytest tests/test_filters.py -q (132 passed).

@davidism

davidism commented Sep 5, 2026

Copy link
Copy Markdown
Member

@davidism davidism closed this Sep 5, 2026
@davidism davidism changed the title Preserve empty strings in indent(first=True) [rejected AI] Preserve empty strings in indent(first=True) Sep 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

indent filter ignores blank=False when first=True on first line

2 participants