File: test.soy

package info (click to toggle)
web-mode 17.3.20-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,164 kB
  • sloc: lisp: 13,359; javascript: 506; jsp: 113; sh: 10; php: 9; makefile: 8; xml: 2
file content (45 lines) | stat: -rw-r--r-- 934 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
<div>
  {param other: html}
    <span>ici</span>
    {@param other: html}
    {@param? other: html}
  {/param}
</div>
<div>
  {switch $numMarbles}
    {case 0}
      You have no marbles.
    {case 1, 2, 3}
      You have a normal number of marbles.
    {default}  // 4 or more
      You have more marbles than you know what to do with.
  {/switch}
</div>
<div>
  {template .example}
    /** A leading doc comment. */
    {@param name: string}
    {@param? height: int} /** A trailing doc comment. */
    ...
  {/template}
</div>
<div>
  {call .mySubtemplate}
    {param aaa: $aaa /}
    {param bbb: $bbb /}
  {/call}

  {foreach $pair in $pairs}
    {call .exampleCallee}
      {param largerNum: $pair.largerInt /}
      {param smallerNum}
        {if $pair.smallerInt}
          {$pair.smallerInt}  // if defined, pass it
        {else}
          {$pair.largerInt - 100}
        {/if}
      {/param}
    {/call}
  {/foreach}

</div>