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

Error on Windows #5

Open
tmbb opened this issue Jul 7, 2017 · 1 comment
Open

Error on Windows #5

tmbb opened this issue Jul 7, 2017 · 1 comment

Comments

@tmbb
Copy link

tmbb commented Jul 7, 2017

I get this error, caused by Slime complaining of line feed characters on windows:

== Compilation error on file lib/talon_blog_demo/talon/views/admin/admin-lte/layout_view.ex ==
** (Slime.TemplateSyntaxError) got FunctionClauseError with message "no function clause matching in String.duplicate/2" while retrieving Exception.message/1 for %Slime.TemplateSyntaxError{column: 0, line: "  head\r", line_number: 3, message: "{:no_match, <<14>>}", source: "INPUT"}
    (slime) lib/slime/parser.ex:27: Slime.Parser.handle_syntax_error/3
    (slime) lib/slime/renderer.ex:17: Slime.Renderer.precompile/1
    (phoenix_slime) lib/phoenix_slime/engine.ex:9: PhoenixSlime.Engine.compile/2
    (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
    lib/talon_blog_demo/talon/views/admin/admin-lte/layout_view.ex:1: TalonBlogDemo.Admin.AdminLte.Web.LayoutView (module)
    (elixir) lib/kernel/parallel_compiler.ex:117: anonymous fn/4 in Kernel.ParallelCompiler.spawn_compilers/1

I've submitted a pull request to Slime that fixes this.
Until it's merged and released, we should keep this issue.

Maybe add this issue to talon, since any project using slime templates will be affected?

@tmbb
Copy link
Author

tmbb commented Jul 7, 2017

It turns out that the issue can't be easily attributed to Slime, even though my PR actually fixes the problem... It's strange.

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

1 participant