r7kamura / rubocop-slim

RuboCop plugin for Slim template.
MIT License
6 stars 1 forks source link

if/else in slim template produces Lint/Syntax error #9

Closed Nerian closed 1 year ago

Nerian commented 1 year ago

Hi,

This code:

- if true
  span hello
- else
  span hello

produces this:

app/views/kaminari/_page.html.slim:13:5: E: Lint/Syntax: unexpected token kELSE
(Using Ruby 3.1 parser; configure using TargetRubyVersion parameter, under AllCops)
  - else
    ^^^^

But the code is actually okay. If this expected behaviour?

Thanks

r7kamura commented 1 year ago

@Nerian Thank you for reporting! I fixed it in v0.2.2, can you try it?

Nerian commented 1 year ago

Working quite nicely thanks 🥳