When using the Expand your search feature, the Expanded Search String output is stripped of any custom formatting, particularly newlines.
When expanding a search, the macro should be expanded and inserted verbatim instead and the formatting should be retained in the Expanded Search String pane.
Idea created for this question ideas/EID-I-1283 - Do not strip out formatting when using the Expand your search feature .
RFEs should be submitted at https://ideas.splunk.com