How to add br tag with Jade HTML

前端 未结 2 1347
醉话见心
醉话见心 2021-01-17 17:54

I need add br tag but this not working.

table
    tbody
        td Juan Perez
        td 01 33 4455 6677
        td Av José Vasconcelos 804-A Pte. 
                 


        
2条回答
  •  灰色年华
    2021-01-17 18:28

    An alternative syntax to the one proposed by Josh is the following:

    table
      tbody
        tr
          td Juan Perez
          td 01 33 4455 6677
          td. 
            Av José Vasconcelos 804-A Pte. #[br]
            Col. Los Sabinos,CP. 66220, San Pedro, N.L.
    

    The dot at the end of the td is used to enter large blocks of plain text in a simpler way, so the following indented block is treated as text, and you don't need to use the pipe (|) preceding every line. (Source: https://pugjs.org/language/plain-text.html)

    Then, to get your explicit
    , you can use the tag interpolation syntax #[br] to inline it inside the text. (Source: https://pugjs.org/language/interpolation.html)

提交回复
热议问题