Skip to content

Dry-run mode #692

@inf17101

Description

@inf17101

Hi,

I need to know whether there is a dry-run mechanism or a way to find out what variables handlebars-rs will replace and render before it is actually doing the replacement.

Background: I wanted to find a way to have the new size of the rendered output without actually rendering it.

Example dry-run output, just written in text form that you know what I mean:

key1: {{some.variable.path.value1}}
key2: {{some.other.variable.value2}}

will lead to dry-run result:

content of 'some.variable.path.value1' will be used
content of 'some.other.variable.value2' will be used

This I need in a programmatic way to request what will be rendered if I would call a render function.

If there is any existing method to get this desired behavior, please let me know.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions