gogocode
gogocode copied to clipboard
`gogo-code-plugin-prettier` misplacement for innerHTML text with no surrounding spaces
- version:
node version 16.20.1
[email protected]
[email protected]
- playground demo: NA
- your description:
opening tag >, innerHTML and closing tag are not placed correctly when innerHTML is not surrouned by space after executing
gogocode -s ./test.vue -t gogocode-plugin-prettier -o ./test.vue
Original code:
<!-- test.vue -->
<template>
<el-button type="primary" size="mini" @click="handleEdit(scope)">edit</el-button>
</template>
Code after executing prettier
<!-- test.vue -->
<template>
<el-button type="primary" size="mini" @click="handleEdit(scope)"
>edit</el-button
>
</template>
Note that if the innterHTML is surrouded by spaces, the prettier works fine as expected.