A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/vuejs/vue/commit/71b4b25375fa4bcd929e1161c35cab133e4a7c23 below:

allow multiline expression in v-for · vuejs/vue@71b4b25 · GitHub

File tree Expand file treeCollapse file tree 2 files changed

+21

-1

lines changed

Filter options

Expand file treeCollapse file tree 2 files changed

+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