Skip to content

Commit 5981be8

Browse files
committed
Merge branch 'master' into gh-3058
2 parents 0e90ddc + f7479bc commit 5981be8

File tree

5 files changed

+12
-13
lines changed

5 files changed

+12
-13
lines changed

.eslintrc.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,9 @@
3939
}],
4040
"@typescript-eslint/no-unused-vars": "off"
4141
},
42+
"globals": {
43+
"globalThis": false
44+
},
4245
"env": {
4346
"es6": true,
4447
"browser": true,

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
"coverage": "c8 report --reporter=text-lcov > coverage.lcov && c8 report --reporter=html",
3131
"codecov": "codecov",
3232
"precodecov": "npm run coverage",
33-
"build": "rollup -c && npm run tsd",
33+
"build": "rollup -c && npm run lint && npm run tsd",
3434
"prepare": "npm run build",
3535
"dev": "rollup -cw",
3636
"pretest": "npm run build",

src/compiler/compile/Component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ export default class Component {
234234
}
235235

236236
helper(name: string) {
237-
const alias = this.alias(name)
237+
const alias = this.alias(name);
238238
this.helpers.set(name, alias);
239239
return alias;
240240
}

src/compiler/compile/render_dom/wrappers/Element/index.ts

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -344,12 +344,10 @@ export default class ElementWrapper extends Wrapper {
344344
parent.name === 'style'
345345
);
346346

347-
return (raw
348-
? wrapper.node.data
349-
: escape_html(wrapper.node.data))
350-
.replace(/\\/g, '\\\\')
351-
.replace(/`/g, '\\`')
352-
.replace(/\$/g, '\\$');
347+
return (raw ? wrapper.node.data : escape_html(wrapper.node.data))
348+
.replace(/\\/g, '\\\\')
349+
.replace(/`/g, '\\`')
350+
.replace(/\$/g, '\\$');
353351
}
354352

355353
if (wrapper.node.name === 'noscript') return '';

test/runtime/samples/nbsp-div/_config.js

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,14 @@ export default {
44
<div>&nbsp;hello&nbsp; &nbsp;hello</div>`,
55

66
test({ assert, component, target }) {
7-
var divList = target.querySelectorAll('div')
7+
const divList = target.querySelectorAll('div');
88
assert.equal( divList[0].textContent.charCodeAt( 0 ), 160 );
99
assert.equal( divList[1].textContent.charCodeAt( 0 ), 160 );
1010
assert.equal( divList[1].textContent.charCodeAt( 6 ), 160 );
1111
assert.equal( divList[1].textContent.charCodeAt( 7 ), 160 );
1212
assert.equal( divList[2].textContent.charCodeAt( 0 ), 160 );
1313
assert.equal( divList[2].textContent.charCodeAt( 6 ), 160 );
14-
assert.equal( divList[2].textContent.charCodeAt( 7 ), 32 );//normal space
14+
assert.equal( divList[2].textContent.charCodeAt( 7 ), 32 ); //normal space
1515
assert.equal( divList[2].textContent.charCodeAt( 8 ), 160 );
16-
17-
1816
}
19-
};
17+
};

0 commit comments

Comments
 (0)