lRespublica left a comment (rpm-software-management/rpm#3663)

Yes, `\` was removed as a side effect of multi-line macros.

The example above demonstrates a situation where logical indentation is 
necessary to improve readability, but %{expand:} cannot be used.

The primary function of %{trim: } is to remove trailing and leading whitespace 
from each line within its body. I was guided by %{shrink: ...} in the 
implementation. However, unlike %{shrink: ...}, it does not remove line breaks 
and preserves the whitespace structure within each line.

How it works

Next expression
<details><summary>Before</summary>

```
%define test_expand1 %{expand:  A   lot  
      of  
      }
                                        
%define test_expand2 %{expand:   trailing   
        whitespaces  }

%define test_trim %{trim:
    %test_expand1  
    %test_expand2                    
}

%test_trim
```

</details> 

After applying of 'trim' will be expanded to

<details><summary>After</summary>

```
A   lot
of

trailing
whitespaces
```

</details> 

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/3663#issuecomment-2732167835
You are receiving this because you are subscribed to this thread.

Message ID: <rpm-software-management/rpm/pull/3663/c2732167...@github.com>
_______________________________________________
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
https://lists.rpm.org/mailman/listinfo/rpm-maint

Reply via email to