microsoft / vscode-powerquery

Visual Studio Code extension for Power Query / M.
MIT License
88 stars 16 forks source link

[Bug] Formatting truncates all comments after let expression #144

Closed ninmonkey closed 2 years ago

ninmonkey commented 2 years ago

Expected behavior To not delete comments when formatting.

let y = 1 in y
// stuff

Actual behavior Formatting deletes comments at the end of the file.

let y = 1 in y

To Reproduce

Using any saved or unsaved files: add comments to the end, then format.

let
    y = 1
in
    y
    // stuff

I tested all combinations of these:

Environment

Name Version
VS Code 1.68.0, 4af164ea3a06f701fe3e89a2bcbb421d2026b68f, x64
Power Query Addon PowerQuery.vscode-powerquery@0.1.38

I don't think there's anything useful in the log, attached anyway. powerquery.log

JordanBoltonMN commented 2 years ago

Resolved with https://github.com/microsoft/powerquery-formatter/pull/55, still requires a new release to be made.