Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
StringTemplate パーシャルで $it$ 以外の変数名を使用するにはどうすればよいですか?
$ it $
$it$これは、デフォルトの変数名を使用してレンダリングされた例です。
$it$
$["FOO","BAR"]:{<h1>$it$</h1>}$
$ x $
この例では、変数の名前は$x$
$x$
$["FOO","BAR"]:{x|<h1>$x$</h1>}$
パーシャルとは何ですか?
とにかく、テンプレートに引数が1つある場合、STもその値を設定します
$a:t()$
デフ用
t(v) ::= "$v$"
と同じです
t() ::= "$それ$"