@unocss/extractor-pug 0.60.1 → 0.60.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.mjs +2 -2
- package/package.json +2 -2
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const regexVueTemplate = /<template.*?lang=['"]pug['"][^>]
|
|
1
|
+
const regexVueTemplate = /<template.*?lang=['"]pug['"][^>]*>([\s\S]*?)<\/template>/g;
|
|
2
2
|
function extractorPug(options = {}) {
|
|
3
3
|
async function compile(code, id) {
|
|
4
4
|
const Pug = await import('pug');
|
|
@@ -24,7 +24,7 @@ function extractorPug(options = {}) {
|
|
|
24
24
|
for (const match of matches) {
|
|
25
25
|
if (match && match[1])
|
|
26
26
|
tail += `
|
|
27
|
-
${await compile(match[1], ctx.id)}`;
|
|
27
|
+
${await compile(match[1].trim(), ctx.id)}`;
|
|
28
28
|
}
|
|
29
29
|
if (tail)
|
|
30
30
|
ctx.code = `${ctx.code}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@unocss/extractor-pug",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.60.
|
|
4
|
+
"version": "0.60.3",
|
|
5
5
|
"description": "UnoCSS extractor for Pug",
|
|
6
6
|
"author": "Anthony Fu <anthonyfu117@hotmail.com>",
|
|
7
7
|
"license": "MIT",
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
"devDependencies": {
|
|
45
45
|
"@types/pug": "^2.0.10",
|
|
46
46
|
"pug": "^3.0.2",
|
|
47
|
-
"@unocss/core": "0.60.
|
|
47
|
+
"@unocss/core": "0.60.3"
|
|
48
48
|
},
|
|
49
49
|
"scripts": {
|
|
50
50
|
"build": "unbuild",
|