pyrochlore / obsidian-tracker

A plugin tracks occurrences and numbers in your notes
MIT License
1.36k stars 230 forks source link

"Thousand separator" not supported in expressions #346

Open stracker-phil opened 7 months ago

stracker-phil commented 7 months ago

When using the summary output, my sum() exceeds 1000. I want to display a thousand separator (ideally a localized one), but this is not working.

searchType: tag
searchTarget: calories
startDate: 0d
endDate: 0d
summary:
  template: "Calories tracked today: {{sum()::i}}"

Parsed template: "Calories tracked today: 18850"

Expected Behavior

Extending the ::i flag with a format option should insert a thousand separator to the message, e.g.

template: "Calories tracked today: {{sum()::'i}}" - I think the official format if %'i to insert the thousand separator. Expected output: "Calories tracked today: 18,850"

Current Behavior

template: "Calories tracked today: {{sum()::'i}}" Current output: The ' (apostrophe) breaks the syntax, the template is not parsed