Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Function with multiple arguments as attribute value #124

Closed
vursen opened this issue May 4, 2017 · 2 comments
Closed

Function with multiple arguments as attribute value #124

vursen opened this issue May 4, 2017 · 2 comments

Comments

@vursen
Copy link

vursen commented May 4, 2017

Hi! I got a problem when i use multiple argument's function:

script src=static_path(@conn, "/js/zepto.min.js")
== Compilation error on file web/views/layout_view.ex ==
** (TokenMissingError) web/templates/layout/app.html.slime:1: missing terminator: ) (for "(" starting at line 1)
    (eex) lib/eex/compiler.ex:36: EEx.Compiler.generate_buffer/4
    (phoenix) lib/phoenix/template.ex:378: Phoenix.Template.compile/2
    (phoenix) lib/phoenix/template.ex:186: Phoenix.Template."-MACRO-__before_compile__/2-fun-0-"/3
    (elixir) lib/enum.ex:1755: Enum."-reduce/3-lists^foldl/2-0-"/3
    (phoenix) expanding macro: Phoenix.Template.__before_compile__/1
    web/views/layout_view.ex:1: App.LayoutView (module)
    (elixir) lib/kernel/parallel_compiler.ex:117: anonymous fn/4 in Kernel.ParallelCompiler.spawn_compilers/1

As a temporary solution I use string interpolation:

script src="#{static_path(@conn, "/js/main.bundle.js")}"

@Rakoth
Copy link
Member

Rakoth commented May 5, 2017

Hi! This is a known issue, as another work-around you can remove space after comma between arguments. Also there is PR #113 with a fix.

@Rakoth
Copy link
Member

Rakoth commented May 9, 2017

closed by #113

@Rakoth Rakoth closed this as completed May 9, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants