1
votes

I'd like to remove space after name and accomplish final HTML to this effect using HAML: John, CEO

%p.about_title_bx
  = truncate about.name,length:100
  , #{truncate about.position,length:100}
1

1 Answers

0
votes

You can add an < in order to remove the whitespace:

%p.about_title_bx<
  = truncate about.name,length:100
  , #{truncate about.position,length:100}

See Whitespace Removal: > and <

Also, remember that HAML is supposed to help with structure, not content. Having a helper method or having that content inline might be a better solution.