Skip to content

Instantly share code, notes, and snippets.

@DylanArnold
Last active February 11, 2020 23:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save DylanArnold/d75c8ad321239decb26b841971f1a74e to your computer and use it in GitHub Desktop.
Save DylanArnold/d75c8ad321239decb26b841971f1a74e to your computer and use it in GitHub Desktop.
object Example {
// Note the extra brace around each element
@dom def ok = {
<div>
{
<div>
{
<div>
{
val foo = "ok"
<div></div>
}
</div>
}
</div>
}
</div>
}
// Note no extra brace around each element, scalafmt is only happy if the inside block is too far left
@dom def notOk = {
<div>
<div>
<div>
{
val foo = "this is too far left"
<div></div>
}
</div>
</div>
</div>
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment