Skip to content
This repository was archived by the owner on Jan 18, 2022. It is now read-only.
This repository was archived by the owner on Jan 18, 2022. It is now read-only.

"Unexpected token 'indent'" when using pug template #86

Closed
@aleksejevski

Description

@aleksejevski

Expected behavior

These two templates should work the same as each other:

<template lang="pug">
  .randomContentGen`
    input(v-model="randomContent",disabled)
    button(@click="randomContentGen") Generate Content!!
</template>
<template lang="pug">
.randomContentGen
    input(v-model="randomContent",disabled)`
    button(@click="randomContentGen") Generate Content!!`
</template>

(There is no tab/space at the beginning of the first line inside the second template, but 2 inside the first template.)

Actual behavior

Only the second template can be complied. When using the first template, the second line of which starts with a tab(2 spaces), an exception is thrown on my console:

�   (vue plugin) F:\rollup-vue-test\src\components\randomContentGen.vue:2:1`
    1|
  > 2|   .randomContentGen
-------^
    3|     input(v-model="randomContent",disabled)`
    4|     button(@click="randomContentGen") Generate Content!!`
    5|

unexpected token "indent"

Steps to reproduce the behavior

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions