Thanks for your clarification. I would prefer PM not to trim spaces.
Here is my use case (note that
$ is my delimiter character - that is most efficient for me on a Swiss keyboard):
- I have a CR file mapping ISO country codes to countries. I have a generic CR file per sport (in this case volleyball). I have a event specific CR file, include players, per event. See below for a specific example!
- When I want to add a caption of both teams standing for the national anthem, I enter the CR $!cna2$.
- This would lead to the caption reading (under the assumption that PM does not trim spaces) $ and $ national volleyball teams stand during the playing of the national anthems ahead of the men's EuroVolley 2026 qualifying match between Switzerland and Sweden at the WIN4 arena on {dow}, {monthname} {day}, {year4} in {city}, {country}. Note that the $ delimiter character serves as a placeholder for additional CRs. This helps me know where I need to add data to the generic caption.
- I then would amend the caption as follows $sui$ and $swe$ national volleyball ..., leading to the final caption when fully evaluated: Switzerland and Sweden national volleyball teams stand during the playing of the national anthems ahead of the men's EuroVolley 2026 qualifying match between Switzerland and Sweden at the WIN4 arena on Saturday, August 16, 2025 in Winterthur, Switzerland.
- This is, to me, a very efficient way of captioning photos in a consistent way. I only have to enter $!cna2$, sui$, and swe$.
- Most of the times it works! But in this particular case $!cna2$ is evaluated to Andorra national volleyball teams stand during the playing of the national anthems ahead of the men's EuroVolley 2026 qualifying match between Switzerland and Sweden at the WIN4 arena on {dow}, {monthname} {day}, {year4} in {city}, {country}, because $ and $ evaluates, after space stripping to Andorra.
I am unclear of a use case where stripping spaces may be preferable over not stripping them in CRs, but would be interested to learn. Maybe having a toggle (enable/disable space stripping in CRs) in the Preferences could address that challenge, if I convinced you of the relevance and it can be implemented with reasonable complexity and I am not the only one running in this issue.
CR file: countries.txt (excerpt)
// ISO country cods
afg Afghanistan
ala Aland Islands
alb Albania
dza Algeria
asm American Samoa
and Andorra
ago Angola
aia Anguilla
CR file: volleyball.txt (generic, excerpt)
// core/spo/volleyball.txt
!ccsp $ head coach speaks with his/her players $+capd$
!cf $ fans follow the game $+capd$
!cna1 $ national volleyball team stands during the playing of the national anthems ahead of $+cap$
!cna2 $ and $ national volleyball teams stand during the playing of the national anthems ahead of $+cap$
!cwu $ and $ warm-up ahead of $+cap$
CR file: sui-swe.txt (match specific, excerpt)
// event/volleyball/sui-swe.txt
+cap the men's EuroVolley 2026 qualifying match between Switzerland and Sweden at the WIN4 arena on {dow}, {monthname} {day}, {year4} in {city}, {country}
+capd during $+cap$
// Team Switzerland
ch01 Ramon Diem
ch02 Peer Harksen
tch01 $ch01$ of team Switzerland
tch02 $ch02$ of team Switzerland