Suppose I have YAML list (or other supported format) that I want to print as a comma-separated list in a markdown format.
data.yml
:
---
items:
- item1
- item2
- item3
---
template.markdown
:
**Items**: $for(items)$$items$, $endfor$
How do I get rid of the trailing comma so I get:
**Items:** item1, item2, item3
Instead of:
**Items:** item1, item2, item3,
With:
pandoc -t markdown --template template.markdown -o output.md data.yml