express - Jade render's my html twice -
maybe i'm asking question wrong since seems answer should relatively easy search for. parsing .md files in express , returning response jade template.
= body returns <h1>my content</h1> string.
#{body} returns <<h1>my content</h1>><!--<h1-->my content> or effectively:
< content #as styled h1 >my content> thanks help.
update clarity: question - why content returning twice.
why content returning twice.
because syntax of #{variable} jade replace variable value , interpret html tag. example:
passing local variable {foo: 'bar'} , template
#{foo} generat html
<bar></bar> so should pass content , don't let interpret jade using = or != unbuffered code:
!=body btw: whitespace forbidden between = , variable!
Comments
Post a Comment