P5.js-web-editor: Length of File Name Cause \n (line break) display in Preview

Created on 2 May 2020  路  4Comments  路  Source: processing/p5.js-web-editor

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

help wanted high bug

All 4 comments

Welcome! 馃憢 Thanks for opening your first issue here! And to ensure the community is able to respond to your issue, be sure to follow the issue template if you haven't already.

Thank you!! This is a very strange bug 馃サ

Hi ! I think this is a good first issue for me , can i go ahead fixing this ?

I'm working on it :)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

andytilia picture andytilia  路  4Comments

catarak picture catarak  路  5Comments

hellonearthis picture hellonearthis  路  4Comments

aferriss picture aferriss  路  5Comments

byfelipesanchez picture byfelipesanchez  路  4Comments