Low code platform for building business apps and workflows in minutes. Supports PostgreSQL, MySQL, MariaDB, MSSQL, MongoDB, Rest API, Docker, K8s, and more 🚀
Fixes an issue where helpers and bindings weren't being parsed if additional spaces were added. This PR adds a processor that looks for multiple spaces and replaces them with one.
I did some benchmarking between the regex approach - statement.replace(/\s{2,}(?=(?:[^'"]*['"][^'"]*['"])*[^'"]*$)/g, " ") and the current approach and the character approach seems much faster.
Description
Fixes an issue where helpers and bindings weren't being parsed if additional spaces were added. This PR adds a processor that looks for multiple spaces and replaces them with one.
I did some benchmarking between the regex approach -
statement.replace(/\s{2,}(?=(?:[^'"]*['"][^'"]*['"])*[^'"]*$)/g, " ")
and the current approach and the character approach seems much faster.Benchmark: https://jsbench.me/3hlxyiknts/1
Addresses
https://linear.app/budibase/issue/BUDI-8385/helper-functions-and-bindings-selected-from-the-popover-menu-add-an