gogocode icon indicating copy to clipboard operation
gogocode copied to clipboard

`gogo-code-plugin-prettier` misplacement for innerHTML text with no surrounding spaces

Open mike1936 opened this issue 2 years ago • 0 comments

  • 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.

mike1936 avatar Aug 21 '23 06:08 mike1936