Skip to content

[CodeMirror v6] Tidy Feature Works Inconsistently #4093

@susan-t

Description

@susan-t

p5.js version

No response

What is your operating system?

Mac OS

Web browser and version

Chrome, Firefox

Actual Behavior

In the v6 editor, when tidying code in one file, it works as normal. However it inconsistently works when trying to tidy code in other files. Sometimes nothing is tidied and the feature breaks for all files and sometimes the feature causes all the code to become one big code block.

Screen.Recording.2026-04-22.at.1.36.02.PM.mov

Expected Behavior

On the regular p5.js site, the tidy feature works consistently.

Screen.Recording.2026-04-22.at.1.37.33.PM.mov

Steps to reproduce

Steps:

  1. Open the v6 sandbox editor
  2. Write some code that is formatted incorrectly into each file segment.
  3. Try and tidy up each file.

Snippet:

// Paste your code here :)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Awaiting Maintainer ApprovalNeeds review from a maintainer before moving forwardBugError or unexpected behaviors

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions