Search code examples
htmlnode.jshyperlinkpug

Hyperlink and regular text in the same line


in HTML, it's easy to add hyperlinks to an otherwise constant text flow. This code:

<a href="http://stackoverflow.com">Visit Stack Overflow!</a> It's a great site.

produces an output like this:

Visit Stack Overflow! It's a great site.

However, in Jade I've apparantly missed the way of adding regular text after a hyperlink (if there's any), since I can add only paragraphs - this Jade template code:

a(href="http://stackoverflow.com") Visit Stack Overflow!
p It's a great site.

produces a similar but different output:

Visit Stack Overflow!

It's a great site.

So the regular text is in a new line instead of being written after the hyperlink.

Is there any means in Jade to do it the same way as in the HTML example?


Solution

  • Try this:

    p  #[a(href="http://stackoverflow.com") Visit Stack Overflow!] It's a great site.