Skip to content

MJML Beautify throws "Error: Edit is only valid while callback runs" #67

@fedxyz

Description

@fedxyz

Description

"MJML beautify" command throws an error and doesn't format the file.

Steps to Reproduce

  1. Open any .mjml file
  2. Run "MJML beautify" command
  3. Error appears in console, no formatting happens

Error

2025-09-11 18:00:50.361 [error] Error: Edit is only valid while callback runs
	at tH.k (file:///snap/code/205/usr/share/code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:120:3175)
	at tH.replace (file:///snap/code/205/usr/share/code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:120:3245)
	at Beautify.<anonymous> (/home/federico/.vscode/extensions/mjmlio.vscode-mjml-2.1.0/out/beautify.js:52:37)
	at Generator.next (<anonymous>)
	at fulfilled (/home/myuser/.vscode/extensions/mjmlio.vscode-mjml-2.1.0/out/beautify.js:5:58)

Note: "Format Document" works fine as workaround (what it uses ?), "Format Document (Forced)" works too but it uses prettier.

vs code version: 1.103.2
mjmlio.vscode-mjml version: 2.1.0

Thanks for the help

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