extends ../reference.jade

block documentation
  h1 Plain Text

  p Jade provides three common ways of getting plain text.  They are useful in different situations

  h2 Piped Text

  p The simplest way of adding plain text to templates is to prefix the line with a <code>|</code> character (pronounced "pipe").

  .row(data-control='interactive')
    .col-lg-6
      +jade
        :jadesrc
          | Plain text can include <strong>html</strong>
          p
            | It must always be on its own line
    .col-lg-6
      +html
        :htmlsrc
          Plain text can include <strong>html</strong>
          <p>It must always be on its own line</p>

  h2 Inline in a Tag

  p Since it's a common use case, you can put text in a tag just by adding it inline after a space.

  .row(data-control='interactive')
    .col-lg-6
      +jade
        :jadesrc
          p Plain text can include <strong>html</strong>
    .col-lg-6
      +html
        :htmlsrc
          <p>Plain text can include <strong>html</strong></p>

  h2 Block in a Tag

  p Often you might want large blocks of text within a tag.  A good example is with inline scripts or styles.  To do this, just add a <code>.</code> after the tag (with no preceding space):

  .row(data-control='interactive')
    .col-lg-6
      +jade
        :jadesrc
          script.
            if (usingJade)
              console.log('you are awesome')
            else
              console.log('use jade')
    .col-lg-6
      +html
        :htmlsrc
          <script>
            if (usingJade)
              console.log('you are awesome')
            else
              console.log('use jade')
          </script>
