luc-github / ESP3D-WEBUI

A Web UI for ESP8266 or ESP32 based boards connected to 3D printers / CNC
GNU General Public License v3.0
747 stars 305 forks source link

Sd source format result #243

Closed alxblog closed 2 years ago

alxblog commented 2 years ago

Easier to read and smaller footprint. Please test it before merge.

luc-github commented 2 years ago

I have tested and found 2 issues : 1 - in case no size in M20 output (old Marlin / custom version of Marlin/ etc...) there is no file detected, file list is empty

Begin file list
V2T-TEST.GCO
DFQ-PI~1.GCO
RESOUR~1/GCODE/APPLE~1.GCO
End file list

2 - extensions regex does not cover all possible extensions like space in extensions chars like : +-! $#, you can refere to :https://en.wikipedia.org/wiki/List_of_filename_extensions for this part I have found changing regex to const extRegExp = new RegExp(([\$a-zA-Z0-9!#\u0020\+\-]+), 'g') seems solve the problem, I had hard time to find right position for \$ as if not set in front I got crash - I do not understand why

luc-github commented 2 years ago

seems Ok for me now - can I merge ?

lagamerie-gestion commented 2 years ago

Yeap !

luc-github commented 2 years ago

Done thank you 😸