Skip to content

Conversation

@zenwork
Copy link
Contributor

@zenwork zenwork commented Jan 3, 2026

Description

fix formatting corner cases with set and if blocks

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
  • Any dependent changes have been merged and published in downstream modules

- Updated `getVentoType` to include additional `LexerTokens` for close elements and fallback handling for malformed blocks.
- Refined `isOpening` logic to account for `SET_ELEMENT` with child nodes.
- Improved block grouping in `applyVentoIndent` to handle unpaired elements effectively.
- Added new test cases in `VentoFormattingTest` for single-line and unpaired `set` elements.
- Moved test configuration setup to a shared private method for consistency and reuse.
- Updated `getVentoType` and `isIntermediate` to handle `LexerTokens.ELSE_KEY` and `LexerTokens.ELSEIF_KEY`.
- Enhanced text parsing logic to return appropriate elements for `else` and `else if` blocks.
- Added comprehensive test cases in `VentoFormattingTest` to validate proper indentation for `if-else` and `if-elseif-else` scenarios.
- Added `@Ignore` annotation to `VentoFormattingTest` with a note clarifying it only runs locally and is not suitable for CI/GitHub workflows.
@zenwork zenwork self-assigned this Jan 4, 2026
@zenwork zenwork added the bug Something isn't working label Jan 4, 2026
@zenwork zenwork merged commit 71229af into main Jan 4, 2026
3 checks passed
@zenwork zenwork deleted the quick_fixes branch January 4, 2026 21:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants