vscode-yaml icon indicating copy to clipboard operation
vscode-yaml copied to clipboard

Company like header comments like #--- get formatted to something very different

Open eferreira4 opened this issue 2 years ago • 0 comments

Describe the bug

Company like comment headers get formatted from

#------------------------------------------------------------------------------
# Description : FOO
# Copyright (C) BAR COMPANY (2023)
#------------------------------------------------------------------------------

to

--- #------------------------------------------------------------------------------

#------------------------------------------------------------------------------
# Description : FOO
# Copyright (C) BAR COMPANY (2023)

Expected Behavior

I would expect it to remain the same, ie not be reformatted. Ie look like:

#------------------------------------------------------------------------------
# Description : FOO
# Copyright (C) BAR COMPANY (2023)
#------------------------------------------------------------------------------

Current Behavior

Got reformatted to

--- #------------------------------------------------------------------------------

#------------------------------------------------------------------------------
# Description : FOO
# Copyright (C) BAR COMPANY (2023)

Steps to Reproduce

  1. create a empty yaml file with any content
  2. add #--- (minimum of 3 dashes after # at the top of the file (first line)
  3. on vscode save to reformat
  4. see that it reformatted to something like (added a newline with --- before the original line)
---
#---

Environment

  • [ ] Windows
  • [ ] Mac
  • [x] Linux
  • [ ] other (please specify)

eferreira4 avatar Apr 05 '23 12:04 eferreira4