jeromegn / slang

Slim-inspired templating language for Crystal
MIT License
236 stars 30 forks source link

Multiline attributes inside an attribute wrapper #43

Open 00dani opened 6 years ago

00dani commented 6 years ago

in Slim, you can take multiple lines to set attributes on a tag, if you use an attribute wrapper. For example, here's something I just tried:

script{
  defer crossorigin="anonymous"
  src="https://use.fontawesome.com/releases/v5.0.13/js/all.js"
  integrity="sha384-xymdQtn1n3lH2wcu0qhcdaOpQwyoarkgLVxC/wZ5q7h9gHtxICrpcaSUfygqZGOe"
}

But in Slang (testing with 1.7.1), the above syntax produces an error on compilation, since it thinks there's an unterminated curly brace. This should probably work!