flyx / emerald

HTML5 templating engine for Nimrod
Do What The F*ck You Want To Public License
95 stars 9 forks source link

Can not format a "complex" expression in a nice way #7

Open yglukhov opened 8 years ago

yglukhov commented 8 years ago
import emerald, json

proc homeView(test: JsonNode) {.html_templ.} =
  html(lang = "en"):
    body:
      p: test["str"].str # This works
      p: test["int"].num # This doesnt
      p: $(test["int"].num) # This doesnt as well, but differently
      p: "" & $(test["int"].num) # Ok, this works, but looks strange =)