A RetroSearch Logo

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

Search Query:

Showing content from https://github.com/vuejs/vue/issues/7792 below:

unable to use new-line in v-for attribute · Issue #7792 · vuejs/vue · GitHub

Version

2.5.15

Reproduction link

https://jsfiddle.net/50wL7mdz/177321/

Steps to reproduce

run and look at the error in the console

What is expected?

new-line (\n) support in v-for

What is actually happening?
vue.js [Vue warn]: Error compiling template:

<div id="app">
  <p v-for="
    i in (2
     2)
  ">{{ message }}</p>
</div>

- invalid expression: Unexpected token } in

    (2

  Raw expression: v-for="
    i in (2
     2)
  "

My real case is much more complex and would need new-line for readability, especially since /* */ comment are accepted.

 <p v-for="
    i in (2 /* foo */
     2)     /* bar */
  ">{{ message }}</p>

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