jscad / OpenJSCAD.org

JSCAD is an open source set of modular, browser and command line tools for creating parametric 2D and 3D designs with JavaScript code. It provides a quick, precise and reproducible method for generating 3D models, and is especially useful for 3D printing applications.
https://openjscad.xyz/
MIT License
2.58k stars 505 forks source link

X3D deserializer: accept commas as MF value delimiters #1287

Closed andreasplesch closed 10 months ago

andreasplesch commented 10 months ago

All Submissions:

see https://github.com/jscad/OpenJSCAD.org/discussions/1241#discussioncomment-6890943

I used a few scripts to refactor the parsing of MF field attribute values and to help with catching all occurrences. The tests run ok and the generated jscad script is identical to inputs without commas. It is still possible that some case was missed.

andreasplesch commented 10 months ago

Node 14 apparently does not have the replaceAll method for strings. Let me see what the node 14 testing is about. Probably there is a simple replacement.

andreasplesch commented 10 months ago

see #1137 . Apparently Node 14 is still widely in use. Let me change to .replace( /,/g , " " ).