Search code examples
slim-lang

Using a slash in Slim


I have the following code that's causing a Slim::Parser::SyntaxError:

p
  code.inline /charge

I expect this to output <code class="inline">/charge</code> but it's just causing Slim to get upset.

Why?


Solution

  • Solved it using the escape character ', like so:

    p
      code.inline
        '/charge
    

    Hacky, but whatever .. it works.