title: match case in scala template doesn't work, in play2
body: <p>My code in scala template:</p>
  
  <pre><code>@session.get("user.id") match {
      case Some(_) =&gt; "xx"
      case _ =&gt; "yy"
  }
  &lt;a href=""&gt;Logout&lt;/a&gt;
  </code></pre>
  
  <p>But the <code>case ...</code> be displayed directly to the generated html page:</p>
  
  <pre><code>match { case Some(_) =&gt; "xx" case _ =&gt; "yy" }  Logout
  </code></pre>
  
  <p>And In the generated .template.scala, it's:</p>
  
  <pre><code>"""
  &lt;body&gt;
  """),_display_(Seq(/*11.4*/session/*11.11*/.get("user.id"))),format.raw/*11.26*/(""" match """),format.raw("""{"""),format.raw/*11.34*/("""
      case Some(_) =&gt; "xx"
      case _ =&gt; "yy"
  """),format.raw("""}"""),format.raw/*14.4*/("""
  &lt;a href=""&gt;Logout&lt;/a&gt;
  """
  </code></pre>
  
  <p>But I see in the doc, it should support the <code>match case</code>: <a href="https://github.com/playframework/Play20/wiki/ScalaTemplates">https://github.com/playframework/Play20/wiki/ScalaTemplates</a></p>
  
  <pre><code>@connected match {
  
    case models.Admin(name) =&gt; {
      &lt;span class="admin"&gt;Connected as admin (@name)&lt;/span&gt;
    }
  
    case models.User(name) =&gt; {
      &lt;span&gt;Connected as @name&lt;/span&gt;
    }
  
  }
  </code></pre>
  
  <p><strong>UPDATE1</strong></p>
  
  <p>Finally, I found a way to work:</p>
  
  <pre><code>@defining(session.get("user.id")) { x =&gt;
      @x match {
          case Some(_) =&gt; { "xx" }
          case None =&gt; {"yy"}
      }
  }
  </code></pre>
  
  <p>But it looks so complicated.</p>
  
  <p><strong>UPDATE2</strong></p>
  
  <p>Find another simple solution:</p>
  
  <pre><code>@{session.get("user.id") match {
      case Some(_) =&gt; "xx"
      case _ =&gt; "yy"
  }}
  </code></pre>
  
  <p>But it doesn't work well in complex case:</p>
  
  <pre><code>@{session.get("user.id") match {
      case Some(_) =&gt; {&lt;a href="@routes.Users.logout"&gt;Logout&lt;/a&gt;}
      case _ =&gt; "yy"
  }}
  </code></pre>
  
  <p>The <code>@routes.Users.logout</code> won't be converted.</p>
  
  <p><strong>UPDATE3</strong></p>
  
  <p>This is a <code>getOrElse</code> solution:</p>
  
  <pre><code>@session.get("user.id").map { _ =&gt;
      &lt;a href="@routes.Users.logout"&gt;Logout&lt;/a&gt;
  }.getOrElse {
      Not logged
  }
  </code></pre>
  
  <p>It works but it doesn't use <code>match case</code></p>