In HAML, I often want to use a punctuation tag immediately after the tag. For example, I might want to highlight something in bold, but have a closing parenthesis. Formatting will look like this: (An approximate sentence with bold text .)
Note that the "bold text" is in bold, but the period and the closing bracket are "." are not.
The obvious HAML is as follows:
(Example sentence with %span.important bold text \.)
but this creates additional space between "bold" and ".". Here is one way to do this:
(Example sentence with %span.important bold text %span>\.)
Where it encloses '.)' In the range with >
, the space disappears. However, this requires an unnecessary interval.
Is there a way to get the desired result without an extra range?
Peter
source share