felangel / felangel/mason

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

オープン
#503 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
Dart
スター
1.1k
フォーク
113
PR マージ指標
30日以内にマージされた PR はありません

説明

**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

```

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。