javascriptttt
javascriptttt

Reputation: 730

How to add a hyperlink in the middle of a line with slim (without a line break)

I want to generate (using slim) the following code but all on one line.

li Hello world
a href="google.com" google
Goodbye

Right now I'm getting the hyperlink starting a new line. I've tried various things with indenting but then the link switches to plain text.

How can I get the text and hyperlink to render on a single line?

Thanks

Upvotes: 0

Views: 634

Answers (1)

user229044
user229044

Reputation: 239402

You can freely insert vanilla HTML tags for this purpose:

li Hello world <a href="google.com">google</a> Goodbye

Otherwise, there is no way to put two tags on one line. It's impossible by the very design of the language.

Upvotes: 2

Related Questions