+21
-1
lines changedFilter options
+21
-1
lines changed Original file line number Diff line number Diff line change
@@ -21,7 +21,7 @@ import {
21
21
22
22
export const onRE = /^@|^v-on:/
23
23
export const dirRE = /^v-|^@|^:/
24
-
export const forAliasRE = /(.*?)\s+(?:in|of)\s+(.*)/
24
+
export const forAliasRE = /([^]*?)\s+(?:in|of)\s+([^]*)/
25
25
export const forIteratorRE = /,([^,\}\]]*)(?:,([^,\}\]]*))?$/
26
26
const stripParensRE = /^\(|\)$/g
27
27
Original file line number Diff line number Diff line change
@@ -464,6 +464,26 @@ describe('Directive v-for', () => {
464
464
}).then(done)
465
465
})
466
466
467
+
// #7792
468
+
it('should work with multiline expressions', () => {
469
+
const vm = new Vue({
470
+
data: {
471
+
a: [1],
472
+
b: [2]
473
+
},
474
+
template: `
475
+
<div>
476
+
<span v-for="n in (
477
+
a.concat(
478
+
b
479
+
)
480
+
)">{{ n }}</span>
481
+
</div>
482
+
`
483
+
}).$mount()
484
+
expect(vm.$el.textContent).toBe('12')
485
+
})
486
+
467
487
const supportsDestructuring = (() => {
468
488
try {
469
489
new Function('var { foo } = bar')
You can’t perform that action at this time.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4