-
Notifications
You must be signed in to change notification settings - Fork 0
Description
Describe the bug
-
In some cases, blocks immediately following conditional or loop directives are not line-broken correctly.
-
The indentation of keyword groups enclosed by directives can become misaligned or incorrect.
Expected behavior
Adjusted the formatting logic to ensure correct handling of block combinations.
Improved directive-aware formatting to apply proper line breaks and indentation based on the position of surrounding blocks.
Also,Add spacing rules to prevent a space from being inserted between a variable directive and a following column name.
Sample
Before:
select
/*%expand*/*
from
employee
where
/*%if min != null */
age >= /* min */10
/*%end */After:
SELECT /*%expand*/*
FROM employee
WHERE
/*%if min != null */ age >= /* min */10
/*%end */