S
S
Sergey Goryachev2017-12-29 00:10:03
Layout
Sergey Goryachev, 2017-12-29 00:10:03

How to make Pug not touch my code?

I write in Pug

a.logo__link(href="/",title="<?php echo $sitename ?>")
a.logo__link(href="/",title='<?php echo $sitename ?>')

And he transforms into
<a class="logo__link" href="/" title="&lt;?php echo $sitename ?&gt;">

How to wean him to break my tags?
Or how to write php in pug correctly?
pug-php-filter is used, but it doesn't work in quotes (both single and double).

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
Sergey Goryachev, 2017-12-29
@webirus

In general, if there are other solutions, I will use them.
For now.

var replace = require('gulp-replace');

.pipe(replace('&lt;', '<'))
.pipe(replace('&gt;', '>'))

S
sergeyevanton, 2017-12-29
@sergeyevanton

Try like this:

a.logo__link(href="/",title='<?php echo $sitename ?>')

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question