mason icon indicating copy to clipboard operation
mason copied to clipboard

feat: Mustache Set Delimiter not working for shorthand syntax of lambdas

Open ABausG opened this issue 2 years ago • 0 comments

Description

Support Shorthand Syntax for builtIn Lambdas with custom Delimiters

Motivation When having the need to have hardcoded brackets like ${{ github.ref_name }} in a generated file it is needed to use custom delimeters for mustache. It is possible to use the built in lamdas however the syntax is quite bulky as they need to be written out. It would be great if the shorthand syntax would also work. (If it is not possible then a small hint in the readme might be nice as I needed some time to figure that out ;) )

Steps to reproduce __brick__/example.md

{{=<% %>=}}
{{ something in brackets }}
<% variable %>
<% variable.snakeCase() %>
<% #snakeCase %><% variable %><% /snakeCase %>
<%={{ }}=%>

brick.yaml

name: example
description: Set Delimiter

version: 0.1.0+1

environment:
  mason: ">=0.1.0-dev.26 <0.1.0"

vars:
  variable:
    type: string
    default: Testing Snake Case

Expected Output File:


{{ something in brackets }}
Testing Snake Case
testing_snake_case
testing_snake_case

Actual Output:


{{ something in brackets }}
Testing Snake Case

testing_snake_case

ABausG avatar Aug 30 '22 14:08 ABausG