slime-lang / phoenix_slime

Phoenix Template Engine for Slime

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Trouble parsing line with delimiter wrapper

pikeas opened this issue · comments

link rel="stylesheet", href="#{static_path(@conn, "/css/app.css")}"

vs

link[rel="stylesheet", href="#{static_path(@conn, "/css/app.css")}"]

vs

link(rel="stylesheet", href="#{static_path(@conn, "/css/app.css")}")

The first and second examples work, the third fails with: ** (TokenMissingError) lib/foo/web/templates/layout/app.html.slim:26: missing terminator: "

This appears to be fixed on the master branch of Slime. However, commas between attributes aren't supported. Please close if that's intentional behavior.

@pikeas Commas between attributes are not allowed in ruby-slim or slime format. Also you don't need an interpolation for href attribute in this example, just use the following syntax:

link rel="stylesheet" href=static_path(@conn, "/css/app.css")

@doomspork I think it can be closed