Did anyone met this situation where the data rendered is surrounded by <
and >
As it seem like the pictures are not being linked, please find the links below;
View: https://drive.google.com/file/d/1sIPhikZVT3mYxpmt-fLlDY8iat4R2bAN/view?usp=sharing
Code: https://drive.google.com/file/d/19kEhXWHSseJkMNrAmPc8pwK-3R4tq7nf/view?usp=sharing
Dependencies: https://drive.google.com/file/d/1zpfkk69d02ePQuRQEOqDXPOQMPYoF_uQ/view?usp=sharing
Hi, I'm very new to pug. I'm trying to format a cell in a table where the cell.style
should return background-style: red
and cell.text
is "foo"
td
span(style="#{cell.style}") #{cell.text}
But this resolves to <td> <span style="#{cell.style}">foo</span></td>
Why doesn't span
extrapolate the value of cell.style
?
i actually see that you can customize this here: https://pugjs.org/api/migration-v3.html but thats a weird place to put the plugin docs and i dont see it anywhere else. I opened a ticket for this.
if anyone wants to either close it with the link to the docs, or tell me how to make them, or make the plugin docs themselves, here's the issue: pugjs/pug-en#31
doctype html
html(lang="en")
head
meta(charset='UTF-8')
meta(name='viewport' content='width=device-width, initial-scale=1.0')
<!DOCTYPE html><html lang="en"><head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0">...
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
</head>
</html>
Hello,
here is NEW pug-plugin for Webpack.
Now is possible to define pug templates in webpack entry. All styles and scripts will be automatically extracted from pug.
const PugPlugin = require('pug-plugin');
module.exports = {
entry: {
'index': './src/index.pug', // extract html, css and js from pug
},
plugins: [
new PugPlugin(),
],
// ...
};
Now is possible to use the source files of styles and scripts directly in pug.
link(href=require('./styles.scss') rel='stylesheet')
script(src=require('./main.js'))
The generated HTML contains hashed CSS and JS output filenames, depending on how webpack is configured.
<link rel="stylesheet" href="/assets/css/styles.05e4dd86.css">
<script src="/assets/js/main.f4b855d8.js"></script>
Are the devs/maintainers in here?
Hope you are doing great, and having a good day
I'm curious to know if this project is still being maintained, I've raised a feature request pugjs/pug#3379.
It would be great if you can have a look there :)