javascript - Output line break into Jade-generated HTML from inside JS Variable -


this jade file

 - var itens = ["sem limites de<br/>vendas", "sem limites de visitas", "sem limites de e-mails", "sem cooparticipação"]; [...] each item, in itens     div.col-xs-12.col-md-6         div.col-xs-5.np.l             img(src="img/#{imgs[i]}", title="#{item}", aria-label="#{item}", alt="#{item}").col-xs-12         div.col-xs-7.np.r             h3 #{item}             p #{itens2[i]} 

and gets outputted:

enter image description here

what's best alternative output real html line-break inside h3 tag?

thanks in advance. o/

jade escaping inside #{} attributes. use !{} or !=. however, don't think should putting html tags inside attributes.

- var itens = ["sem limites de<br/>vendas", "sem limites de visitas", "sem limites de e-mails", "sem cooparticipação"]; [...] each item, in itens     div.col-xs-12.col-md-6         div.col-xs-5.np.l             img(src="img/#{imgs[i]}", title="#{item}", aria-label="#{item}", alt="#{item}").col-xs-12         div.col-xs-7.np.r             h3!= item             p= itens2[i] 

Comments

Popular posts from this blog

get url and add instance to a model with prefilled foreign key :django admin -

css - Make div keyboard-scrollable in jQuery Mobile? -

ruby on rails - Seeing duplicate requests handled with Unicorn -