Skip to content

Bug with template string code formatting #773

@kleinesfilmroellchen

Description

@kleinesfilmroellchen

Nature of issue?

  • Found a bug
  • Existing feature enhancement
  • New feature request

Details about the bug:

After trying the text editor with a larger project I have written, I discovered the following: when using a template string of the form

text(`Lives ${playerLives}\nStreak ${round(streak*10)/10}`, 0, 0);

(used to display game information in draw()) the code after it is regarded as part of the template string, or in other terms:

image

Everything after this line turns turqoise.

Now, to be clear, this is fully functional code without any errors whatsoever, it is just a flaw in the editor's formatting system

  • Web browser and version: Chrome 70.0.3538.110
  • Operating System: Windows 10
  • Steps to reproduce this: Open this Editor page and file sketch.js or create similar code to what is shown above.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Good First IssueA beginner-friendly issue, great for first-time contributorsHelp WantedWould love additional input or contributions!Priority:MediumModerately important, should be completed in a fair timeframe

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions