michaelstepner / pandoc-mustache

Pandoc filter for variable substitution using Mustache syntax
Creative Commons Zero v1.0 Universal
55 stars 14 forks source link

Support nested YAML lists #1

Open trenkert opened 6 years ago

trenkert commented 6 years ago

pandoc-mustache produces errors when dealing with nested yaml blocks

this is my mustache.yaml file:


author: 
         name: Max Power
         affiliation: Springfield Power Plant
         position: senior security officer

favourites:
        pet: dog
        foods:
            donut
            beer```

and this is my report.md file

`Hi, my name is {{author.name}} and I'm a {{author.position}} at {{author.affiliation}}. I like {{favourites.foods.beer}} `

could this functionality be included?
michaelstepner commented 6 years ago

This is a good idea, and it is a part of the Mustache spec: see here. I'd welcome a pull request.

I've pasted the contributing section from the README below.

Contributing

Project Status: Inactive

This code is not being actively developed. It was created to fulfill my pandoc writing needs, and the current feature set is adequate for me.

If you have a feature request, it is unlikely that I will be able to implement it for you. You can create an issue to generate discussion. If you implement a feature, you can file pull request and I will review it eventually, as time permits. If you're interested in making major additions to the code, I'd be happy to welcome a new maintainer to the project.

jgrigera commented 4 years ago

Just to say that this has been sorted upstream (pystache) and thus this is working out of the box. I began doing a fork until I found this was already there. So @michaelstepner you can probably close!