GhostManager / Ghostwriter

The SpecterOps project management and reporting engine
https://ghostwriter.wiki
BSD 3-Clause "New" or "Revised" License
1.31k stars 181 forks source link

Add support for looping lists and tables in rich text jinja #435

Closed ColonelThirtyTwo closed 4 months ago

ColonelThirtyTwo commented 4 months ago

Similar to docx templates, you can now use {%li for ...}, {%tr for ...}, {%p for ...} and other variations to repeat sections for lists, tables, and paragraphs. This works by finding the ancestor of the jinja tag that matches the prefix, and replacing it and its contents with the jinja tag without the prefix.