Unexpected space when renaming pdfs

Hi, I meet a problem when renaming my files using the "Rename File from Parent Metadata" function. For some files, there will be an extra space added at the beginning of the filename.

For example,
Paper "Simulation Optimization in the New Era of AI" by Peng and several other others (https://pubsonline.informs.org/doi/10.1287/educ.2023.0264);
Expectation after renaming:
Peng_et_al_ 2023_simulation_optimization_in_the_new_era_of_ai.pdf
what I got:
Peng_et_al_ 2023_simulation_optimization_in_the_new_era_of_ai.pdf

The following is my renaming rules
{{ if authors == {{ authors max="2" }} }}
{{ authors join="_" suffix="_" }}
{{ else }}
{{ authors max = "1" suffix="_et_al_" }}
{{ endif }}
{{ year suffix="_" }}
{{ title truncate="100" case="snake" }}

I double checked that there is no space in front of Peng in the metadata. And this does not happen to every entry.

Thanks for the help in advance.
  • Please ignore the post:

    Figured out that it was because I left spaces between some of the }} and {{
Sign In or Register to comment.