I need to print following using slim syntax:
tr
td "[Send] Value"
or
tr
td [Send] Value
So square brackets are not visible (so interpreted somehow different): I get only Value
How to escape --> [Send] <-- ?
Some workaround:
tr
th = "[Send] Value"
but it I hope there is a more "clean" way to escape square brackets, other than using ruby interpreter to escape them
The brackets are being parsed as containing the attributes for the element. You could add a “dummy” set of attribute wrapping brackets:
td () [Send] Value
You could also nest the content on the next line, using the pipe character to signify it’s plain text:
td
| [Send] Value
Both of these produce <td>[Send] Value</td> as output.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With