Closed dzpt closed 2 years ago
There is no pug variable in your example, interpolation is a text feature, it does not apply inside a string such as in attribute. Inserting a variable in attribute would simply be in Pug:
a(href=abc)
Also, pug code does not represent static HTML code. Because of the mixin/extends/loops/etc., it actually represents dynamic template. So anyway, you would have any relevant way to transform pug code to HTML other than rendering the template completely.
I wonder how can i convert the pug file back to HTML and keep variables in it?
a(href='#{abc}')
would be
<a href="#{abc}" />
all pug to html converter couldn't run with some complex syntaxes