phoenix_slime icon indicating copy to clipboard operation
phoenix_slime copied to clipboard

Getting an error when leaving a space between `doctype` and `html`

Open lobo-tuerto opened this issue 5 years ago • 5 comments

Hello, I'm just trying out Slime and while converting my app.html.eex file I found out that if I write this:

doctype html

html

I get an error like:

Compiling 1 file (.ex)

== Compilation error in file lib/rumbl_web/views/layout_view.ex ==
** (Slime.TemplateSyntaxError) Unexpected symbol '
'
INPUT, Line 2, Column 1

Notice the empty line between doctype and html. If I remove the space everything is ok.

It also works like this:

doctype html
|
html

Is there any particular reason why an empty line is not allowed between the doctype and html tags?

lobo-tuerto avatar Dec 07 '19 04:12 lobo-tuerto

@lobo-tuerto what versions are you running? This should work unless I'm misunderstanding something here.

doomspork avatar Dec 20 '19 16:12 doomspork

@doomspork According to mix.lock:

:phoenix_slime, "0.13.0"
:slime, "1.2.1"

lobo-tuerto avatar Dec 20 '19 17:12 lobo-tuerto

@doomspork It seems like an interesting issue, I am willing to work on it. Can you or anyone else give me pointers If any?

Tolsee avatar Mar 28 '20 15:03 Tolsee

Already fixed in slime https://github.com/slime-lang/slime/issues/160

Rakoth avatar Mar 29 '20 04:03 Rakoth

Thanks all! I’m going to cut a new release shortly

doomspork avatar May 17 '20 13:05 doomspork