Skip to content

Length of File Name Cause \n (line break) display in Preview #1413

Closed
@zeyaoli

Description

@zeyaoli

Nature of issue?

  • Found a bug

Details about the bug:

If a user creates a new js file (or multiple files) naming with only two letters, it returns "\n" (line break) on the preview. See example: https://editor.p5js.org/zeyaoli/sketches/T8PHsajuq I created gu.js, and du.js, which returns two "\n". If I took one file off, it showed one "\n".

  • Web browser and version: Chrome Version 81.0.4044.122 (Official Build) (64-bit)
  • Operating System: MacOS Ver 10.15.2
  • Steps to reproduce this bug:

In the HTML page, it renders code like under;

" \n      "
<script data-tag="\"@fs-du"],[86,"du.js\">...</script>
" \n     "

If I changed the file name from gu.js to gu-file.js, then the line break is gone.

Screen Shot 2020-05-02 at 5 27 51 PM

Screen Shot 2020-05-02 at 5 34 21 PM

Metadata

Metadata

Assignees

No one assigned

    Labels

    Help WantedWould love additional input or contributions!Priority:HighShould be addressed soon but not critical

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions