update
This commit is contained in:
+11
-2
@@ -57,6 +57,11 @@ function Compiler(node, options) {
|
||||
if (this.pp && typeof this.pp !== 'string') {
|
||||
this.pp = ' ';
|
||||
}
|
||||
if (this.pp && !/^\s+$/.test(this.pp)) {
|
||||
throw new Error(
|
||||
'The pretty parameter should either be a boolean or whitespace only string'
|
||||
);
|
||||
}
|
||||
this.debug = false !== options.compileDebug;
|
||||
this.indents = 0;
|
||||
this.parentIndents = 0;
|
||||
@@ -452,7 +457,9 @@ Compiler.prototype = {
|
||||
visitMixinBlock: function(block) {
|
||||
if (this.pp)
|
||||
this.buf.push(
|
||||
"pug_indent.push('" + Array(this.indents + 1).join(this.pp) + "');"
|
||||
'pug_indent.push(' +
|
||||
stringify(Array(this.indents + 1).join(this.pp)) +
|
||||
');'
|
||||
);
|
||||
this.buf.push('block && block();');
|
||||
if (this.pp) this.buf.push('pug_indent.pop();');
|
||||
@@ -504,7 +511,9 @@ Compiler.prototype = {
|
||||
this.mixins[key].used = true;
|
||||
if (pp)
|
||||
this.buf.push(
|
||||
"pug_indent.push('" + Array(this.indents + 1).join(pp) + "');"
|
||||
'pug_indent.push(' +
|
||||
stringify(Array(this.indents + 1).join(pp)) +
|
||||
');'
|
||||
);
|
||||
if (block || attrs.length || attrsBlocks.length) {
|
||||
this.buf.push(name + '.call({');
|
||||
|
||||
+12
-12
@@ -1,33 +1,33 @@
|
||||
{
|
||||
"_args": [
|
||||
[
|
||||
"pug-code-gen@3.0.1",
|
||||
"/mnt/Foxconn/Digitalent/Deverloper/liff-push_2series"
|
||||
"pug-code-gen@3.0.2",
|
||||
"/home/node/nuxt"
|
||||
]
|
||||
],
|
||||
"_development": true,
|
||||
"_from": "pug-code-gen@3.0.1",
|
||||
"_id": "pug-code-gen@3.0.1",
|
||||
"_from": "pug-code-gen@3.0.2",
|
||||
"_id": "pug-code-gen@3.0.2",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha512-xJIGvmXTQlkJllq6hqxxjRWcay2F9CU69TuAuiVZgHK0afOhG5txrQOcZyaPHBvSWCU/QQOqEp5XCH94rRZpBQ==",
|
||||
"_integrity": "sha512-nJMhW16MbiGRiyR4miDTQMRWDgKplnHyeLvioEJYbk1RsPI3FuA3saEP8uwnTb2nTJEKBU90NFVWJBk4OU5qyg==",
|
||||
"_location": "/pug-code-gen",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"type": "version",
|
||||
"registry": true,
|
||||
"raw": "pug-code-gen@3.0.1",
|
||||
"raw": "pug-code-gen@3.0.2",
|
||||
"name": "pug-code-gen",
|
||||
"escapedName": "pug-code-gen",
|
||||
"rawSpec": "3.0.1",
|
||||
"rawSpec": "3.0.2",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "3.0.1"
|
||||
"fetchSpec": "3.0.2"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/pug"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/pug-code-gen/-/pug-code-gen-3.0.1.tgz",
|
||||
"_spec": "3.0.1",
|
||||
"_where": "/mnt/Foxconn/Digitalent/Deverloper/liff-push_2series",
|
||||
"_resolved": "https://registry.npmjs.org/pug-code-gen/-/pug-code-gen-3.0.2.tgz",
|
||||
"_spec": "3.0.2",
|
||||
"_where": "/home/node/nuxt",
|
||||
"author": {
|
||||
"name": "Forbes Lindesay"
|
||||
},
|
||||
@@ -54,5 +54,5 @@
|
||||
"type": "git",
|
||||
"url": "https://github.com/pugjs/pug/tree/master/packages/pug-code-gen"
|
||||
},
|
||||
"version": "3.0.1"
|
||||
"version": "3.0.2"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user