Search code examples
htmlpug

Block entire sections of HTML in jade/pug instead of individual lines


In Jade/Pug you can render out raw HTML with pipe

| <div>some stuff</div>

Is there an effective way if you need to block out hundreds of lines?


Solution

  • Yes, just use a period at the end of the parent tag. This is used a lot with script elements:

    script.
      (type as many Javascript lines as you want here)
    

    Look under the header "Block in a Tag" in the Plain Text documentation