Search code examples
ruby-on-railsslim-lang

SLIM add space at start of multi line


I am trying to add a space to the start of my slim template where I have had to break the text due to a link, I cant for the life of me work this one out

.mdl-cell.mdl-cell--4-col-phone.mdl-cell--8-col-tablet.mdl-cell--12-col-desktop
  | Don't have an account?
  = link_to 'Create one here.', sign_up_path

Solution

  • found after some deeper research that the slim way is to use > so the new code is, which forced whitespace at the end of the first line

    span> Don't have an account? 
    = link_to 'Create one here.', sign_up_path