How to insert raw HTML in Pug file (not include external HTML file)

ditoslav picture ditoslav · Nov 24, 2014 · Viewed 16.2k times · Source

So what I want is to put some multiline HTML into a Pug file and can't find anywhere how to do this.

Example:

html
    head

    body
        <div><a href="lala"> blabla </a></div>

        p hihuhohoo

Answer

Scimonster picture Scimonster · Nov 24, 2014

Pug text can include HTML. Just force it as text, and it should parse:

html
    head

    body
        | <div><a href="lala"> blabla </a></div>

        p hihuhohoo

Also, you were using backslashes, not forward slashes, to close elements.